-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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', why? #1892
Comments
There's not enough information here to help you. What command are you running? |
I'm not sure why, but I think you need to clone the repo and then install from the local copy. pip is trying to build the library in an isolated environment, which won't work. There are other issues where people list what they did to install on Windows. |
try: |
Thanks @HengYuD !!! Your suggestion worked.
I successfully installed on Windows 11 using Micromamba (highly recommend). I followed these setup steps specifically: Install micromambaMicromamba is a lightweight python package manager. Set up Environment
|
Any plan on supporting the installation in isolated environments? Migrating from |
Yes please! I use this library heavily for research but the difficulties regarding installation are a big barrier for the reproducibility of results... |
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Obtaining file:///E:/python310/GeneFacePlusPlus-main/GeneFacePlusPlus-main/pytorch3d-0.7.8/pytorch3d-0.7.8
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... error
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
Traceback (most recent call last):
File "E:\python310\GeneFacePlusPlus-main\GeneFacePlusPlus-main\myenv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "E:\python310\GeneFacePlusPlus-main\GeneFacePlusPlus-main\myenv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "E:\python310\GeneFacePlusPlus-main\GeneFacePlusPlus-main\myenv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 132, in get_requires_for_build_editable
return hook(config_settings)
File "C:\Users\DELL\AppData\Local\Temp\pip-build-env-0bnzwr2a\overlay\Lib\site-packages\setuptools\build_meta.py", line 464, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
File "C:\Users\DELL\AppData\Local\Temp\pip-build-env-0bnzwr2a\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "C:\Users\DELL\AppData\Local\Temp\pip-build-env-0bnzwr2a\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "C:\Users\DELL\AppData\Local\Temp\pip-build-env-0bnzwr2a\overlay\Lib\site-packages\setuptools\build_meta.py", line 503, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\DELL\AppData\Local\Temp\pip-build-env-0bnzwr2a\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
exec(code, locals())
File "", line 15, in
ModuleNotFoundError: No module named 'torch'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
but I do have torch installed
(myenv) PS E:\python310\GeneFacePlusPlus-main\GeneFacePlusPlus-main\pytorch3d-0.7.8\pytorch3d-0.7.8> pip list | findstr /sina:c 'torch'
14:torch 2.4.1+cu124
15:torchaudio 2.4.1+cu124
16:torchvision 0.19.1+cu124
The text was updated successfully, but these errors were encountered: