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

Unable to Install DeepSpeed on Windows using pip #6865

Open
H4CK3R-5M4CK3R opened this issue Dec 13, 2024 · 1 comment
Open

Unable to Install DeepSpeed on Windows using pip #6865

H4CK3R-5M4CK3R opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels

Comments

@H4CK3R-5M4CK3R
Copy link

Hello,

I am facing an issue while trying to install DeepSpeed on a Windows machine using pip. I have followed the installation instructions carefully, including installing the necessary dependencies, but I am encountering errors during the installation.

System Specifications:

  • OS: Windows 10 (64-bit)
  • Python Version: 3.9.6
  • PyTorch Version: 2.5.1
  • CUDA Version: 12.6
  • CUDA Driver: nvcc version 12.6.85
  • Visual Studio: Visual C++ Build Tools (installed as per the instructions)
  • DeepSpeed Installation: Installed via .whl file since pip install deepspeed didn't work

Steps Taken:

  1. Installed Python 3.9.6 and PyTorch 2.5.1 using pip.
  2. Installed CUDA version 12.6 and verified the nvcc command works correctly.
  3. Installed Visual C++ Build Tools and ensured that cl and other necessary components are available.
  4. Attempted to install DeepSpeed using pip install deepspeed, but encountered the error.
  5. As pip install wasn't working, I downloaded and installed DeepSpeed using the .whl file that matched my CUDA version but its not working either when i import it it shows errors.

Error Message:

pip install deepspeed
Collecting deepspeed
  Using cached deepspeed-0.16.1.tar.gz (1.4 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      [2024-12-14 01:52:07,089] [WARNING] [real_accelerator.py:174:get_accelerator] Setting accelerator to CPU. If you have GPU or other accelerator, we were unable to detect it.
      [2024-12-14 01:52:07,100] [INFO] [real_accelerator.py:219:get_accelerator] Setting ds_accelerator to cpu (auto detect)
      [2024-12-14 01:52:08,091] [WARNING] [real_accelerator.py:174:get_accelerator] Setting accelerator to CPU. If you have GPU or other accelerator, we were unable to detect it.
      [2024-12-14 01:52:08,094] [INFO] [real_accelerator.py:219:get_accelerator] Setting ds_accelerator to cpu (auto detect)
      test.c
      LINK : fatal error LNK1181: cannot open input file 'aio.lib'
      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 34, in <module>
        File "C:\Users\pryan\AppData\Local\Temp\pip-install-7evsvyl5\deepspeed_1ed4e80276ba424e947cc565c335309d\setup.py", line 209, in <module>
          result = subprocess.check_output(git_hash_cmd)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\pryan\miniconda3\Lib\subprocess.py", line 466, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\pryan\miniconda3\Lib\subprocess.py", line 548, in run
          with Popen(*popenargs, **kwargs) as process:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\pryan\miniconda3\Lib\subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Users\pryan\miniconda3\Lib\subprocess.py", line 1538, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [WARNING] Torch did not find cuda available, if cross-compiling or running with cpu only you can ignore this message. Adding compute capability for Pascal, Volta, and Turing (compute capabilities 6.0, 6.1, 6.2)
      DS_BUILD_OPS=1
       [WARNING]  Skip pre-compile of incompatible async_io; One can disable async_io with DS_BUILD_AIO=0
      Install Ops={'deepspeed_not_implemented': 1, 'async_io': False, 'deepspeed_ccl_comm': 1, 'deepspeed_shm_comm': 1, 'cpu_adam': 1, 'fused_adam': 1}
      [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.

And here is Torch Cuda verification Output

>>> import torch
>>> torch.cuda.is_available()
True
>>>
@loadams loadams self-assigned this Dec 13, 2024
@loadams
Copy link
Contributor

loadams commented Dec 13, 2024

Hi @H4CK3R-5M4CK3R - the reason for this is that we haven't published the latest version of DeepSpeed for Windows yet. The most up to date Windows whl is version 0.15.0 (shown in files here: https://pypi.org/project/deepspeed/0.15.0/#files)

We are working on getting this pipeline fixed so we will publish Windows whls of newer versions too but aren't there yet.

This whl is also only built with python 3.11, so you'd need to have that, and I see from your information you're using python 3.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants