直接 pip 安装 deepspeed 的报错信息
如果直接使用 pip install DeepSpeed 安装,会触发如下报错信息。出现后,需使用如下方法完成安装。
Collecting deepspeed
Downloading deepspeed-0.14.3.tar.gz (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 4.1 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
╰─> [15 lines of output]
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\Changxing\AppData\Local\Temp\pip-install-m3_5w4lm\deepspeed_f82b888e581d4d19a24987ccd691885a\setup.py", line 181, in <module>
abort(f"Unable to pre-compile {op_name}")
File "C:\Users\Changxing\AppData\Local\Temp\pip-install-m3_5w4lm\deepspeed_f82b888e581d4d19a24987ccd691885a\setup.py", line 53, 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.
解决:
Step 1|克隆 DeepSpeed 仓库
git clone https://github.com/microsoft/DeepSpeed.git