三步安装apex
注意请不要用pip install apex直接安装,虽然可以安装成功,但是仍然无法使用。
此方法在Windows10和unbantu22.04实测有效
(1)网页下载apex库
https://github.com/nvidia/apex
(2)cd 进入apex文件夹
比如我的环境是在E盘(E:\ProgramData\Anaconda3\envs\liuhaiwen_envs\py3.7_cuda11.3qt
我把apex下载到了G:\liuhaiwen\packages\apex-master
cd进入文件夹后结果如下(不会cd可百度):
(E:\ProgramData\Anaconda3\envs\liuhaiwen_envs\py3.7_cuda11.3qt) G:\liuhaiwen\packages\apex-master>
(3)安装
pip install -e .
(E:\ProgramData\Anaconda3\envs\liuhaiwen_envs\py3.7_cuda11.3qt) G:\liuhaiwen\packages\apex-master>pip install -e .
Obtaining file:///G:/liuhaiwen/packages/apex-master
Preparing metadata (setup.py) ... done
Requirement already satisfied: packaging>20.6 in e:\programdata\anaconda3\envs\liuhaiwen_envs\py3.7_cuda11.3qt\lib\site-packages (from apex==0.1) (23.0)
Installing collected packages: apex
Running setup.py develop for apex
Successfully installed apex-0.1
安装成功