CondaHTTPError: HTTP 000 CONNECTION FAILED for url(解决方法)
一、CondaHTTPError问题
conda httperror http none none for url none Anaconda更新失败
在conda安装好之后,默认的镜像是官方的,由于官网的镜像在境外,访问太慢或者不能访问,为了能够加快访问的速度,这里选择了清华的的镜像。在命令行中运行(设置清华的镜像)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
在用户home目录下,找到 .condarc 文件,删掉channels下面的 -defaults一行
如果仍然错误的话,(可以先试试(二)中的方法,如果还不行,再试用这个)将channels:下的链接更新为https://mirror.tuna.tsinghua.edu.cn/help/anaconda/连接下的anconda源,比如:
conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/'
conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/'
conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
以上转自https://blog.csdn.net/ebzxw/article/details/80702506
二 、如果以上方法未解决:
可以把配置种的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
主要是把自己遇到的问题和找到的解决办法总结在了一起, 方便自己以后再次遇到,也好找到. 有帮助的直接拿走, 嘻嘻