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

ModuleNotFoundError: No module named 'torch' #51

Open
caoshouling opened this issue Jun 27, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'torch' #51

caoshouling opened this issue Jun 27, 2024 · 1 comment

Comments

@caoshouling
Copy link

caoshouling commented Jun 27, 2024

run ' pip install -r requirements.txt' error:

Downloading xformers-0.0.13.tar.gz (292 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.5/292.5 kB 306.1 kB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Administrator\AppData\Local\Temp\pip-install-50qgtq26\xformers_d607119a9f054b879af1d2d4fcb11e5e\setup.py", line 18, in
import torch
ModuleNotFoundError: No module named 'torch'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

@GregBahm
Copy link

GregBahm commented Jul 8, 2024

I also encountered this issue. Attempting to run the command in Windows Powershell on Windows 11 in administrator mode. After some googling, I tried running "pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118" thinking maybe the docs assumed PyTorch was already installed (whatever that is.)

But this just yielded a different error:

 Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Owner\AppData\Local\Temp\pip-install-sto6g2ul\xformers_788d1f75b7d344f7a30fc98ded0215fd\setup.py", line 239, in <module>
          ext_modules=get_extensions(),
        File "C:\Users\Owner\AppData\Local\Temp\pip-install-sto6g2ul\xformers_788d1f75b7d344f7a30fc98ded0215fd\setup.py", line 157, in get_extensions
          raise RuntimeError(
      RuntimeError: CUTLASS submodule not found. Did you forget to run `git submodule update --init --recursive` ?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I thought about googling for an installation of this "CUTLASS" thing but I'm worried this issue is systemic,

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