I’m trying to install Wan2.1
and part of the requirements are to make sure PyTorch is installed. When installing the requirements, I see this:
Collecting flash_attn (from -r requirements.txt (line 14))
Using cached flash_attn-2.8.0.post2.tar.gz (7.9 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 35, in <module>
File "/tmp/pip-install-iry0zzsu/flash-attn_822fcc6b33334bee9b9beadb1b2f0ea3/setup.py", line 22, in <module>
import torch
File "/home/jagar005/.local/lib/python3.9/site-packages/torch/__init__.py", line 404, in <module>
_load_global_deps()
File "/home/jagar005/.local/lib/python3.9/site-packages/torch/__init__.py", line 360, in _load_global_deps
raise err
File "/home/jagar005/.local/lib/python3.9/site-packages/torch/__init__.py", line 318, in _load_global_deps
ctypes.CDLL(global_deps_lib_path, mode=ctypes.RTLD_GLOBAL)
File "/usr/lib64/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/jagar005/.local/lib/python3.9/site-packages/torch/lib/libtorch_global_deps.so: failed to map segment from shared object
[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.
I initially thought it might be a permissions error (from similar threads), but when I launch the Python console, and try an import torch
, I get a ModuleNotFoundError
.
cc @ProGamerGov because I saw them solve another similar case, I hope that’s okay.