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

flash_attn-2.6.3 installation crash #86

Open
GLambard opened this issue Aug 7, 2024 · 0 comments
Open

flash_attn-2.6.3 installation crash #86

GLambard opened this issue Aug 7, 2024 · 0 comments

Comments

@GLambard
Copy link

GLambard commented Aug 7, 2024

Trouble:

During installation with pip install -e ., I encountered the following error:

Obtaining file://<user_directory>/omniparse
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting Pillow<11.0.0,>=10.1.0 (from omniparse==0.0.1)
  Downloading pillow-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (9.2 kB)
Collecting art<7.0,>=6.2 (from omniparse==0.0.1)
  Downloading art-6.2-py3-none-any.whl.metadata (69 kB)
Collecting beautifulsoup4<5.0.0,>=4.12.3 (from omniparse==0.0.1)
  Using cached beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting fastapi<0.112.0,>=0.111.0 (from omniparse==0.0.1)
  Using cached fastapi-0.111.1-py3-none-any.whl.metadata (26 kB)
Collecting filetype<2.0.0,>=1.2.0 (from omniparse==0.0.1)
  Downloading filetype-1.2.0-py2.py3-none-any.whl.metadata (6.5 kB)
Collecting flash-attn<3.0.0,>=2.5.9 (from omniparse==0.0.1)
  Downloading flash_attn-2.6.3.tar.gz (2.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 61.2 MB/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 "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-hg68yz3k/flash-attn_eb201cf3b3c94e82bea7ad772cbcb1e2/setup.py", line 21, in <module>
          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.
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.

Solution:

Installed torch manually for my cuda-version (11.8) with conda:
conda install pytorch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 pytorch-cuda=11.8 -c pytorch -c nvidia

Note that torch==2.2.2 is explicitly required in the pyproject.toml for compatibility reasons.

Cheers!

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

1 participant