CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pk

**

CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/repodata.json

Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64’

创建虚拟环境遇到上述问题

**

解决方案:
1.首先尝试了:重新配置清华大学镜像,将https改成http:
修改配置文件

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

逐行执行,此执行没有返回结果
执行完毕后,再次创建虚拟环境

conda create -n pytorch160 python=3.6.9

结果……failed了,太惨了
config bug
然后试了其他版本的虚拟环境创建依旧如此,绝望了,又把刚配置的镜像给移除掉了

conda config --remove channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --remove channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --remove channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

早知今日何必当初,唉……
查看了下当前配置中已有的镜像源

conda config --show-sources

show sources

并看不出来有什么不妥
第一次尝试以失败告终……

2.突发奇想
关掉全局的VPN
又重新创建了下虚拟环境
好神奇
好使啦
success
总之,不同人遇到此问题可能场景不太一样,还是得多方尝试才行!
1.关代理,换网络
2.没有镜像源的增加镜像源
3.有镜像源的将“https”换成“http”试试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值