前提:已安装pytorch
下载apex:https://github.com/NVIDIA/apex
打开requirements.txt,看清要求:cxxfilt>=0.2.0,tqdm>=4.28.1,numpy>=1.15.3,PyYAML>=5.1,pytest>=3.5.1
安装requirements.txt里面要求的东西; 我用的是anaconda,打开anaconda prompt,进入自己的虚拟环境(自己随便)activate xxx(自己环境名字),然后:
pip install cxxfilt pip install tqdm pip install numpy pip install PyYAML pip install pytest
第四步:
依然是虚拟环境下,安装:
python setup.py install --cpp_ext安装结果最后显示有:
Processing dependencies for apex==0.1 Finished processing dependencies for apex==0.1安装成功,整个过程挺快的.
卸载:
pip uninstall apex
refer:
https://blog.csdn.net/alittlebai1/article/details/107297706
更多安装方法:
https://my.oschina.net/u/4353890/blog/4535348
