[Python] pip error: failed to map segment from shared object

Discussão em 'Python' iniciado por Stack, Junho 25, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to install Wan 2.1 on a remote box and I'm seeing the following error when it gets to flash_attn:

    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 "/home/jagar005/dev/tmp/pip-install-ch1uomgk/flash-attn_f8d54031d33645928635b8bf49f36a0c/setup.py", line 22, in <module>
    import torch
    File "/home/jagar005/.local/lib/python3.9/site-packages/torch/__init__.py", line 408, in <module>
    _load_global_deps()
    File "/home/jagar005/.local/lib/python3.9/site-packages/torch/__init__.py", line 364, in _load_global_deps
    raise err
    File "/home/jagar005/.local/lib/python3.9/site-packages/torch/__init__.py", line 312, 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]


    from other threads, it sounded like an issue with the TMPDIR location, but using those solutions hasn't helped me. What can I do here?

    Continue reading...

Compartilhe esta Página