1 官方github (https://github.com/NVIDIA/apex)
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
报错是因为基础环境有误,参考
https://blog.csdn.net/justforacm/article/details/115428583
2 来自知乎(https://zhuanlan.zhihu.com/p/146515828)
git clone https://github.com/NVIDIA/apex
cd apex
python3 setup.py install
python setup.py install --cuda_ext --cpp_ext