Anaconda建立新的环境,conda下载加速或出现“CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.错误解决

conda下载加速 或者conda下载出错(结果出现了CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/repodata.json
)解决方法。

一、电脑的环境

操作系统:ubuntu18.04

Anaconda版本:conda 4.8.4

二、解决步骤

方法一:pip install XXX -i https://pypi.tuna.tsinghua.edu.cn/simple

方法二:将主目录下的conda配置文件.condarc(路径为~/.condarc)里面的内容改为以下内容:

channels:
  - defaults
show_channel_urls: true
channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

你可能感兴趣的:(深度学习相关,anaconda)