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', why? #1892

Open
AITestPlatform2024 opened this issue Oct 13, 2024 · 3 comments
Open

No module named 'torch', why? #1892

AITestPlatform2024 opened this issue Oct 13, 2024 · 3 comments

Comments

@AITestPlatform2024
Copy link

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

@bottler
Copy link
Contributor

bottler commented Oct 14, 2024

There's not enough information here to help you. What command are you running?

@AITestPlatform2024
Copy link
Author

error

There's not enough information here to help you. What command are you running?

@bottler
Copy link
Contributor

bottler commented Oct 14, 2024

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.

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