anaconda在创建虚拟环境时出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url问题

参考的这位博主:https://blog.csdn.net/lyydcg/article/details/115967216?ops_request_misc=&request_id=&biz_id=102&utm_term=CondaHTTPError:%20HTTP%20000%20CONNE&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-4-115967216.142^v63^js_top,201^v3^control_1,213^v2^t3_esquery_v3&spm=1018.2226.3001.4187anaconda无法创建虚拟环境,在创建虚拟环境时,出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url问题,如下图我在网上也找了很多关于这种问题的解决办法,他们大多都是说时因为镜像源的问题,是因为镜像源访问速度过慢,会导致超时从而导致更新和下载失败。于是我就把我原来安装的清华镜像源给去掉,恢复成默认的源。conda config --remove-key channels 现在,查看一下我此时的源,为默认的源再试着新建一次虚拟环境,还是不行,同样https://blog.csdn.net/lyydcg/article/details/115967216?ops_request_misc=&request_id=&biz_id=102&utm_term=CondaHTTPError:%20HTTP%20000%20CONNE&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-4-115967216.142%5Ev63%5Ejs_top,201%5Ev3%5Econtrol_1,213%5Ev2%5Et3_esquery_v3&spm=1018.2226.3001.4187

记录一下过程:

1、先是到清华镜像源按照以下网址的步骤操作anaconda | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

2、跟着这位博主操作anaconda在创建虚拟环境时出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url问题_.鸣蜩.的博客-CSDN博客

总结一些镜像源以及conda查看源、删除源等命令:

阿里源:
conda config --add channels https://mirrors.aliyun.com/pypi/simple/

清华源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
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/cloud/msys2/
清华源还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch等)的镜像。如果需要pytorch, 还需要添加pytorch的镜像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes

中科大源:
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes
【
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/  】

查看已安装的源:
conda config --show-sources或conda config --show channels
换回默认源:conda config --remove-key channels
删除安装的源:conda config --remove channels
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
将包源路径显示出来,命令为:conda config --set show_channel_urls yes

经过无数次实验证明,清华源必须是http,https必定会报HTTP错误的!!

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一鹿向晗99

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值