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

pip install -e . failed with ModuleNotFoundError: No module named 'torch' #383

Open
SeekPoint opened this issue May 6, 2023 · 2 comments

Comments

@SeekPoint
Copy link

(gh_Megatron-DeepSpeed_yk) ub2004@ub2004-B85M-A0:~/nndev/Megatron-DeepSpeed_yk$ python3
Python 3.8.10 (default, Mar 13 2023, 10:26:41)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import torch

(gh_Megatron-DeepSpeed_yk) ub2004@ub2004-B85M-A0:~/nndev/Megatron-DeepSpeed_yk$ pip install -e .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///home/ub2004/nndev/Megatron-DeepSpeed_yk
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpt8h0pmfx get_requires_for_build_wheel /tmp/tmp8ag4vfhf
cwd: /home/ub2004/nndev/Megatron-DeepSpeed_yk
Complete output (19 lines):
Traceback (most recent call last):
File "/tmp/tmpt8h0pmfx", line 280, in
main()
File "/tmp/tmpt8h0pmfx", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmpt8h0pmfx", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-axg278ny/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-axg278ny/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-axg278ny/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-axg278ny/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "", line 25, in
File "/home/ub2004/nndev/Megatron-DeepSpeed_yk/megatron/init.py", line 15, in
import torch
ModuleNotFoundError: No module named 'torch'

ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpt8h0pmfx get_requires_for_build_wheel /tmp/tmp8ag4vfhf Check the logs for full command output.
(gh_Megatron-DeepSpeed_yk) ub2004@ub2004-B85M-A0:~/nndev/Megatron-DeepSpeed_yk$

@manestay
Copy link

manestay commented Aug 3, 2023

I have the same issue. I verified that import torch works in a python shell from that directoy.

@Eugene29
Copy link

Eugene29 commented Aug 2, 2024

same.

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

3 participants