安装detectron2出现的错误

在使用命令:

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/...(自己要下的网址)

参考:fatal: unable to access ‘https://github.com/facebookresearch/detectron2.git/’: gnutls_handshake() failed: The TLS connection was non-properly terminated.解决方案


下载如果最后失败提示:
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__)"

最后安装成功
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值