在安装Anaconda时出现CondaHTTPError HTTP 000 CONNECTION FAILED for url问题如何解决?

在安装Anaconda时,会出现无法创建虚拟环境和无法成功安装其他第三方包的问题,最后报如下错误:
在这里插入图片描述

上面错误时因为默认镜像源访问速度过慢,导致超时从而导致更新和下载失败。针对这个问题采用:更换镜像源为清华镜像源,并且删除默认镜像源。

(1)执行下面几条命令更换清华镜像源:

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

(2)更改镜像源配置文件:

在用户根目录下(C:\Users\用户名)找到.condarc文件,打开并编辑,删除其中default配置行:
在这里插入图片描述在这里插入图片描述

(3)更改过后就可以重新安装包了,速度会很快的!
在这里插入图片描述在这里插入图片描述

参考链接:https://blog.csdn.net/ada0915/article/details/78529877

猜你喜欢

转载自blog.csdn.net/qq_43254543/article/details/104418886