错误代码:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_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.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
'https://repo.anaconda.com/pkgs/main/linux-64'
修改.condarc文件:
对于linux该文件在用户根目录下,即~/.condarc,windows系统则在C:\Users\用户名)下,修改改文件,去掉-defaults的那行,然后保存!
检查一下是否能够下载了?
不管是否能下载,最好都替换一下镜像源,并且有时候也可能是因为镜像源的问题,下载太慢
修改镜像源:
在命令行中依次执行下命令:
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
接下来应该就ok了
如果还不行,那就删除 conda-forge,删除后环境就能配置了。conda-forge是为了建立和维护软件包而发起的,有的包必须从这里面下,但是不一定把它写到配置里面也能用。
注意镜像源不是越多越好!
本文介绍了如何解决CondaHTTPError错误,通过修改.condarc文件并更换镜像源来改善下载速度,确保Conda环境正常配置。
3182

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



