zoukankan      html  css  js  c++  java
  • Anaconda更新失败简单解决[CondaHTTPError: HTTP 000 CONNECTION FAILED for url]

    问题:conda无法安装更新,报错内容如下:
    参考链接:conda httperror http none none for url none Anaconda更新失败

    conda create -n tensorflow python=3.5

    Fetching package metadata .......
    CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/linux-64/rpodata.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.
    ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='nanomirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceded with url: /anaconda/cloud/linux-64/repodata.json (Caused by ConnectTimeoutError(<requests.packages.urllib3.connecton.VerifiedHTTPSConnection object at 0x7fb6d340dcc0>, 'Connection to nanomirrors.tuna.tsinghua.edu.cn timed out. (connct timeout=9.15)'))",),)
    解决方法:

    #首先先添加清华的镜像源
    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

    #如果无法解决,则删除channels配置文件中部分内容

    #具体操作如下:
    #1、快速创建channels配置文件的备份(保险起见)
    cp ~/.condarc{,.bak}

    #查看配置文件的内容
    cat ~/.condarc.bak
    channels:
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
    - http://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud
    - defaults
    - http://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
    - http://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/conda
    - bioconda
    - r
    - conda-forge
    show_channel_urls: true

    #2、删除部分内容
    ## 主要是删除此行: - defaults
    #修改后配置文件的内容如下:
    vim ~/.condarc
    channels:
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
    show_channel_urls: true

  • 相关阅读:
    phpMyAdmin cannot login to mysql server
    emulation 与 simulation 的区别
    C++类构造函数中的成员初始化
    KEY IDEA For Topology-based Analysis
    NOTES ON [Efficient and Cost-Effective Hybrid Congestion Control for HPC Interconnection Networks]
    Install Google Chrome On Ubuntu 14.04
    idea 远程debug调试
    癌细胞作用于身体
    应用高cpu高内存占用
    Jackson总结:常用注解、整合spring、自定义JsonSerializer
  • 原文地址:https://www.cnblogs.com/adolfmc/p/11955642.html
Copyright © 2011-2022 走看看