Window环境下安装Apex报错问题及安装步骤(亲测有效)
- 错误合集
No.1: error detected in the compilation of "csrc/multi_tensor_scale_kernel.cu"
No.2: module 'torch.nn' has no attribute 'backends'
No.3: AttributeError: module 'torch.distributed' has no attribute '_all_gather_base'
No.4: ImportError was: ModuleNotFoundError("No module named 'amp_C'")
No.56789...: 乱七八糟
2、安装补充
(1)卸载
如果之前安装了,需要先卸载
pip uninstall apex
(2)安装
git clone https://github.com/NVIDIA/apex.git
cd apex
git checkout f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0
python setup.py install --cuda_ext --cpp_ext
pip3 install -v --no-cache-dir ./
3、安装成功界面
参考文章(反正我也不明白为啥就能运行跑通,多方参考,大力出奇迹):
https://blog.csdn.net/qq_17783559/article/details/127813381、https://zhuanlan.zhihu.com/p/360412833
转载链接:https://blog.csdn.net/The_Shiled/article/details/127997704