DeepSpeed: Can't install Deepspeed
pip install deepspeed
Collecting deepspeed
Using cached deepspeed-0.6.5.tar.gz (567 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[24 lines of output]
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\RGWyo\AppData\Local\Temp\pip-install-pdq_etar\deepspeed_5154de904eb44c55af7b10637df57bda\setup.py", line 152, in <module>
abort(f"Unable to pre-compile {op_name}")
File "C:\Users\RGWyo\AppData\Local\Temp\pip-install-pdq_etar\deepspeed_5154de904eb44c55af7b10637df57bda\setup.py", line 48, in abort
assert False, msg
AssertionError: Unable to pre-compile sparse_attn
DS_BUILD_OPS=1
[WARNING] cpu_adam requires the 'lscpu' command, but it does not exist!
[WARNING] cpu_adam attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
[WARNING] cpu_adam requires the 'lscpu' command, but it does not exist!
[WARNING] cpu_adam attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
[WARNING] cpu_adagrad requires the 'lscpu' command, but it does not exist!
[WARNING] cpu_adagrad attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
[WARNING] cpu_adagrad requires the 'lscpu' command, but it does not exist!
[WARNING] cpu_adagrad attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
[WARNING] please install triton==1.0.0 if you want to use sparse attention
[WARNING] One can disable sparse_attn with DS_BUILD_SPARSE_ATTN=0
[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.
I have Win11
Tried to disable sparse and async_io.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 30 (5 by maintainers)
I also have this issue on ubuntu 22.04
triton 1.0.0 isnt aviable anymore
Thanks, with the steps provided here https://github.com/microsoft/DeepSpeed and afterwards pip install “deepspeed-0.9.1+cc67f22f-py3-none-any.whl” it finally worked for me
@PleezDeez You are seeing an error with the
DS_BUILD_OPS
environment variable because setting environment variables in Windows Command Prompt or PowerShell is different than on linux: Linux:export DS_BUILD_OPS=0
Command Prompt:set DS_BUILD_OPS=0
PowerShell:$Env:DS_BUILD_OPS=0
Please try setting
DS_BUILD_OPS=0
andDS_BUILD_AIO=0
and you will not need to worry aboutlibaio.so
@AndreyRGW I just re-read your original post and noted that you’re on Windows 11. I believe that’s why the versions of triton differ in our pip output.
I don’t currently have access to a system with Windows and GPUs, so I can’t test the install process completely… but in powershell, I can avoid the error you are seeing by disabling pre-compile altogether:
Our support for Windows is something we’re working on, so if this doesn’t work you could also try using Windows Subsystem for Linux (WSL) and install deepspeed in the linux environment that provides.
windows上,我在这里https://pypi.org/project/deepspeed/#files 下载了对应的包,解压之后直接放在虚拟环境里可以成功
Same error: `(venv) C:\Python\venv\Scripts>pip install deepspeed==0.8.3 Collecting deepspeed==0.8.3 Downloading deepspeed-0.8.3.tar.gz (765 kB) ---------------------------------------- 765.4/765.4 kB 4.4 MB/s eta 0:00:00 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] test.c LINK : fatal error LNK1181: Eingabedatei “aio.lib” kann nicht ge”ffnet werden. 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\Sascha\AppData\Local\Temp\pip-install-_o9duc57\deepspeed_fbec153d955b4244ae7a50c9468c627f\setup.py”, line 198, in <module> create_dir_symlink(‘…\…\csrc’, ‘.\deepspeed\ops\csrc’) File “C:\Users\Sascha\AppData\Local\Temp\pip-install-_o9duc57\deepspeed_fbec153d955b4244ae7a50c9468c627f\setup.py”, line 190, in create_dir_symlink os.remove(dest) PermissionError: [WinError 5] Zugriff verweigert: ‘.\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 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, ‘utils’: False} [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.`
I use Windows 11, which one do you use @AndreyRGW ? And how did you install deepspeed? I used cmd in Admin mode
Same problem in Windows 11
`pip install deepspeed Collecting deepspeed Using cached deepspeed-0.8.3.tar.gz (765 kB) Preparing metadata (setup.py) … error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [27 lines of output] No CUDA runtime is found, using CUDA_HOME=‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1’ test.c Microsoft ® Incremental Linker Version 14.35.32216.1 Copyright © Microsoft Corporation. All rights reserved.
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.`
I also get the same error:
I am using the latest version of pip (22.2.2), but triton 1.0.0 still does not appear.