当前位置:   article > 正文

Conda使用时CondaHTTPError: HTTP 000 CONNECTION FAILED错误解决_condahttperror: http 000 connection failed for url

condahttperror: http 000 connection failed for url

1、错误描述

最近使用conda create环境时遇见下面错误,Ubuntu和Windows都会遇到:

  1. Collecting package metadata (current_repodata.json): failed
  2. CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json>
  3. Elapsed: -
  4. An HTTP error occurred when trying to retrieve this URL.
  5. HTTP errors are often intermittent, and a simple retry will get you on your way.
  6. If your current network has https://www.anaconda.com blocked, please file
  7. a support request with your network engineering team.
  8. 'https://repo.anaconda.com/pkgs/main/linux-64'

2、解决方法

(1)首先检查防火墙是否关闭

这是很坑的,我折腾了好久发现防火墙没关闭!!!

(2)推荐修改镜像源

Windowns直接搜索.condarc进行编辑,Ubuntu则使用下面命令编辑:

vi ~/.condarc

直接把下面内容复制粘贴:

  1. channels:
  2. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  3. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  4. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  5. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/
  6. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
  7. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
  8. - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  9. show_channel_urls: true
  10. ssl_verify: false

但是windows下有时候还是有问题,尝试将https改为http就没问题了。

(3)不行了换个网络或者换手机热点试试哈哈哈

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/151644?site
推荐阅读
相关标签
  

闽ICP备14008679号