CondaHTTPError: HTTP 000 CONNECTION FAILED for url报错解决记录

1、使用conda创建环境遇到如下问题:

 

 

2、备份原来的配置文件

mv .condarc .condarc.backup

 

3、创建新的配置文件 

vim .condarc
##输入:
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true
##然后保存

 

4、测试

[root@linuxprobe ~]# conda search trinity  ## 没有之前的报错
Loading channels: done

PackagesNotFoundError: The following packages are not available from current channels:

  - trinity

Current channels:

  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/linux-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch

 

参考:https://blog.csdn.net/cxm4399/article/details/100530896

posted @ 2020-10-20 14:40  小鲨鱼2018  阅读(1186)  评论(0编辑  收藏  举报