DeepSpeed: [BUG] Error when using pip to install DeepSpeed on Windows

Describe the bug Deepspeed doesn’t install

To Reproduce On windows, attempt installation

Expected behavior Deepspeed installs

ds_report output Please run ds_report to give us details about your setup.

Screenshots

Collecting deepspeed
  Using cached deepspeed-0.8.1.tar.gz (759 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-2xliqc0s\deepspeed_6dafb10283b0475191a25142e9116e28\setup.py", line 156, in <module>
          abort(f"Unable to pre-compile {op_name}")
        File "C:\Users\user\AppData\Local\Temp\pip-install-2xliqc0s\deepspeed_6dafb10283b0475191a25142e9116e28\setup.py", line 48, in abort
          assert False, msg
      AssertionError: Unable to pre-compile sparse_attn
      [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=0
       [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]  sparse_attn cuda is not available from torch
       [WARNING]  please install triton==1.0.0 if you want to use sparse attention
       [ERROR]  Unable to pre-compile sparse_attn
      [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.

System info (please complete the following information):

  • OS: Win 11
  • GPU count and types 3060
  • Interconnects (if applicable) n/a
  • Python version 3.10.9
  • Any other relevant info about your setup WPy64-31090

Launcher context Are you launching your experiment with the deepspeed launcher, MPI, or something else? No Docker context Are you using a specific docker image that you can share? No Additional context Add any other context about the problem here. there’s no tritons available when listing

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 30 (15 by maintainers)

Most upvoted comments

even bitsandbytes are now officially supported on Windows!

Hi @FurkanGozukara - Windows is not unsupported, however there are features that are unable to be used due to dependencies that do not support Windows.

The install directions that we have used in the past are here - though due to the various nature of each users Windows setup, it is much more likely that one will hit issues.

There is currently an active PR here that lists steps in more detail that are likely more helpful than what is currently listed and might save you some time troubleshooting.

I am making tutorials and this is useless for me since average people can’t make it work.

I need pip install wheel_url

It shouldn’t be that hard

  1. I am in a conda env on Windows, created with: conda create --name valle python=3.10.8 anaconda
  2. I have set my env vars per the instructions in this thread to bypass building aoi.lib (and even tried removing all ops)… (valle) D:\github\vall-e>set ds DS_BUILD_AIO=0 DS_BUILD_OPS=0 DS_BUILD_SPARSE_ATTN=0
  3. I still am unable to pip install deepspeed, because it tries to find the aio.lib (which was not built)… (valle) D:\github\vall-e>pip install deepspeed Collecting deepspeed Using cached deepspeed-0.9.5.tar.gz (809 kB) Preparing metadata (setup.py) … error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [22 lines of output] [2023-06-30 10:44:44,408] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect) [2023-06-30 10:44:45,361] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect) No CUDA runtime is found, using CUDA_HOME=‘C:\Users\jason\miniconda3\envs\valle’ test.c LINK : fatal error LNK1181: cannot open input file ‘aio.lib’ fatal: not a git repository (or any of the parent directories): .git Traceback (most recent call last): File “<string>”, line 2, in <module> File “<pip-setuptools-caller>”, line 34, in <module> File “C:\Users\jason\AppData\Local\Temp\pip-install-1oyp_47u\deepspeed_f58c153aaa114017bf27fea6947eeadd\setup.py”, line 205, in <module> create_dir_symlink(‘…\…\csrc’, ‘.\deepspeed\ops\csrc’) File “C:\Users\jason\AppData\Local\Temp\pip-install-1oyp_47u\deepspeed_f58c153aaa114017bf27fea6947eeadd\setup.py”, line 197, in create_dir_symlink os.remove(dest) PermissionError: [WinError 5] Access is denied: ‘.\deepspeed\ops\csrc’ [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=0 [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] sparse_attn cuda is not available from torch [WARNING] sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.0 [WARNING] please install triton==1.0.0 if you want to use sparse attention Install Ops={‘async_io’: False, ‘cpu_adagrad’: False, ‘cpu_adam’: False, ‘fused_adam’: False, ‘fused_lamb’: False, ‘quantizer’: False, ‘random_ltd’: False, ‘sparse_attn’: False, ‘spatial_inference’: False, ‘transformer’: False, ‘stochastic_transformer’: False, ‘transformer_inference’: False}

Hi @loadams. I created an issue. Please see it here #2914 Thanks!