在conda虚拟环境中安装apex时需要首先进入虚拟环境中,以下操作均在虚拟环境中执行。
一、git clone 报错
执行gie clone指令时(以apex为例):
git clone https://github.com/NVIDIA/apex
错误:
fatal: unable to access ‘https://github.com/NVIDIA/apex/’: gnutls_handshake() failed: The TLS connection was non-properly terminated.
二、解决方法
1.clone之前 先执行:
cd $INSTALL_DIR
2.再执行git clone
git clone https://github.com/NVIDIA/apex
可以看到clone成功:
3.cd 到apex目录并安装:
cd apex
python setup.py install
4.退出:
执行:
unset INSTALL_DIR
安装完成。
5.ps(git clone git):
不需要创建虚拟目录时,只需要将https改为git就可以了:
git clone git://github.com/NVIDIA/apex