Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no module named 'torch' / no module named 'hallo' tripped by inference.py line 39 #118

Closed
CPavlis opened this issue Jun 29, 2024 · 2 comments

Comments

@CPavlis
Copy link

CPavlis commented Jun 29, 2024

update: (problem was using python >3.10 - also forgot to run pip install .)

Everything went fine except installing xformers which for some reason spits out "no module named torch" dispite torch pytoch torchvision and I think a couple others installed. I tried installing xformers with --no-dependencies but it spit out the same...

update: very similar to facebookresearch/xformers#740
update: pip install wheels solved this!

so I tried anyway to run python3 scripts/inference.py without any command line just to see if it would spit out some errors, as I don't have a .wav or pic formatted yet, and was surprised it couldn't find hallo

anyone have any ideas for this issue? (I should probably mention this is in a venv)

@CPavlis CPavlis changed the title no module named 'hallo' tripped by inference.py line 39 no module named 'torch' / no module named 'hallo' tripped by inference.py line 39 Jun 29, 2024
@AricGamma
Copy link
Member

After installed wheels, please try re-install this project as a package by pip install .

@CPavlis
Copy link
Author

CPavlis commented Jun 30, 2024

after wheels was installed pip install xformers still failed but this time with "nvcc exited with code 255"

pip install . was something I remember reading a few times but never tried - noob mistake? problem with self-teaching, now i know, thanks. - I note while it was running it downloaded nvidia_nccl, torch and torchvision - but produced the same ending

.../ai/hallo/lib/python3.12/site-packages/torch/include/ATen/core/boxing/impl/boxing.h:42:106: error: expected primary-expression before ‘)’ token
42 | struct has_ivalue_to<T, std::void_t<decltype(std::declval().to())>>
| ^
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 255
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xformers
Running setup.py clean for xformers
Successfully built hallo
Failed to build xformers

further research is suggesting the problem with python 3.12, I tried using pyenv global 3.10 after pyenv install 3.10 but python3 still runs 3.12

.. think I got it, having to remake the venv with python3.10 -m venv /path update: same - going to reinstall hallo from scratch ensuring python 3.10.. installed fine, I assume once I have media it'll work, issue resolved.

@CPavlis CPavlis closed this as completed Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants