• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Conda使用时CondaHTTPError: HTTP 000 CONNECTION FAILED错误解决

武飞扬头像
AnywalkerGISer
帮助1

1、错误描述

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

  1.  
    Collecting package metadata (current_repodata.json): failed
  2.  
     
  3.  
    CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json>
  4.  
    Elapsed: -
  5.  
     
  6.  
    An HTTP error occurred when trying to retrieve this URL.
  7.  
    HTTP errors are often intermittent, and a simple retry will get you on your way.
  8.  
     
  9.  
    If your current network has https://www.anaconda.com blocked, please file
  10.  
    a support request with your network engineering team.
  11.  
     
  12.  
    '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)不行了换个网络或者换手机热点试试哈哈哈

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfikcge
系列文章
更多 icon
同类精品
更多 icon
继续加载