当前位置:   article > 正文

apex安装,解决ModuleNotFoundError: No module named ‘packaging‘ error: subprocess-exited-with-error_modulenotfounderror: no module named 'packaging' e

modulenotfounderror: no module named 'packaging' error: subprocess-exited-wi

在anaconda上安装apex

安装步骤:

  1. git clone https://github.com/NVIDIA/apex
  2. cd apex
  3. pip install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" ./

报错: 

  1. ModuleNotFoundError: No module named 'packaging'
  2. error: subprocess-exited-with-error
  3. × Getting requirements to build wheel did not run successfully.
  4. exit code: 1
  5. ╰─> See above for output.
  6. note: This error originates from a subprocess, and is likely not a problem with pip.
  7. full command: 'D:\SOFTWARE\Anaconda\Anaconda3\envs\Dunit\python.exe' 'D:\SOFTWARE\Anaconda\Anaconda3\envs\Dunit\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\admin\AppData\Local\Temp\tmpsb751068'
  8. cwd: C:\Users\admin\apex
  9. Getting requirements to build wheel ... error
  10. error: subprocess-exited-with-error
  11. × Getting requirements to build wheel did not run successfully.
  12. exit code: 1
  13. ╰─> See above for output.
  14. note: This error originates from a subprocess, and is likely not a problem with pip.

解决方法:

  1. git clone https://github.com/NVIDIA/apex
  2. cd apex
  3. pip install -v --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--deprecated_fused_adam" --global-option="--xentropy" --global-option="--fast_multihead_attn" ./

如何解决的:上GitHub进入https://github.com/NVIDIA/apex/issues/1679看别人如何解决试出来,亲测有效,常见问题上面都有!祝大家运行顺利!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/47231?site
推荐阅读
相关标签
  

闽ICP备14008679号