在使用命令:
git clone https://github.com/hpanwar08/detectron2.git
出现错误:fatal: unable to access ‘https://github.com/facebookresearch/detectron2.git/’: gnutls_handshake() failed: The TLS connection was non-properly terminated.
解决方法:
依次输入
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global -l
git config --global http.proxy
git clone https://github.com/...(自己要下的网址)
下载如果最后失败提示:
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
这个错误提示表明,安装过程中的某个子进程出现了问题,但问题并不在pip本身
一定要去看上面RuntimeError的提示信息,例如这里可以知道我这里是cuda版本和pytorch版本不匹配
(并不是所有出现note都是我这个问题,大家一定要看报错信息,还有可能是版本太低、缺少依赖、网络连接等)
于是我就删除了pytorch当前版本
pip uninstall torch torchvision torchaudio
然后使用命令下载我当前cuda对应的pytorch版本:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu111
可以去官网找自己对应版本的安装命令,如果没有可以尝试像我这样把最后cuxxx改为自己的cuda版本
例如我是11.1那就改为cu111
使用下面命令可以查看自己的pytorch版本进行验证:
python -c "import torch; print(torch.__version__)"
最后安装成功