conda使用清华源一直出现HTTP错误问题

错误描述

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.

是在创建conda新环境的时候出现的: conda create -n myEnvironmentName python=3.7

PS:如果是安装依赖包不使用pip install, conda安装博不太友好..

问题解决:

(这个方法对我有效,不知道对你有没有效)

1. 终端打开conda配置文件gedit .condarc

2.删除原文件内容并替换为下面的:

 1 channels:
 2   - defaults
 3 show_channel_urls: true
 4 default_channels:
 5   - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
 6   - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
 7   - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
 8 custom_channels:
 9   conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
10   msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
11   bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
12   menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
13   pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
14   simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

3. 问题解决!

原连接:https://blog.csdn.net/zqm_0015/article/details/114581341?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.essearch_pc_relevant&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.essearch_pc_relevant

 

posted @ 2021-10-28 15:13  重大的小鸿  阅读(3064)  评论(0编辑  收藏  举报