**
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了,太惨了

然后试了其他版本的虚拟环境创建依旧如此,绝望了,又把刚配置的镜像给移除掉了
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

并看不出来有什么不妥
第一次尝试以失败告终……
2.突发奇想
关掉全局的VPN
又重新创建了下虚拟环境
好神奇
好使啦

总之,不同人遇到此问题可能场景不太一样,还是得多方尝试才行!
1.关代理,换网络
2.没有镜像源的增加镜像源
3.有镜像源的将“https”换成“http”试试

6万+

被折叠的 条评论
为什么被折叠?



