当前位置:   article > 正文

Windows 11安装DeepSpeed报错(Unable to pre-compile async_io)问题解决_deepspeed安装失败

deepspeed安装失败

Windows 11安装DeepSpeed报错(Unable to pre-compile async_io)问题解决

报错如下

 Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.exit code: 1
  ╰─> [17 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\Administrator\AppData\Local\Temp\pip-install-4_iivh0f\deepspeed_07db96ef892c4625952709f60a01fd85\setup.py", line 163, in <module>
          abort(f"Unable to pre-compile {op_name}")
        File "C:\Users\Administrator\AppData\Local\Temp\pip-install-4_iivh0f\deepspeed_07db96ef892c4625952709f60a01fd85\setup.py", line 51, in abort
          assert False, msg
      AssertionError: Unable to pre-compile async_io
      Setting ds_accelerator to cuda (auto detect)
      [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]  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]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

解决方法

  1. 首先通过git下载deepspeed:
git clone https://github.com/microsoft/DeepSpeed.git
  • 1
  1. 运行如下命令:
Set-Item Env:\DS_BUILD_OPS 0
  • 1
  1. 运行cmd或PowerShell,进入deepspeed文件夹下,运行build_win.bat编译DeepSpeed。
  2. 进入dist文件夹,运行pip install命令进行安装
 pip install .\deepspeed-0.14.1+unknown-py3-none-any.whl
  • 1
  1. 安装成功:在这里插入图片描述
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/995453
推荐阅读
相关标签
  

闽ICP备14008679号