Anaconda An HTTP error occurred when trying to retrieve this URL.HTTP errors are often intermittent

产生上面的原因是anaconda的.org服务器在国外,下载速度很慢,对于大安装包就会导致上面的问题,国内的镜像普遍用清华的,在命令窗口输入如下:

#添加TUNA镜像
conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

#设置搜索时显示通道地址
conda config --set show_channel_urls yes

Anaconda An HTTP error occurred when trying to retrieve this URL.HTTP errors are often intermittent_第1张图片
但是我在下载scrapy时,却出现了上面的问题,CondaHttpError,连下载都无法下载,找了一些解决方案,其在
C:\Users\用户名 目录下找到并打开 .condarc 文件内容如下:

channels: 
-“ https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ ”
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
- defaults
show_channel_urls: ture

将该文件改为下面形式:

 channels: 
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
    - defaults
    show_channel_urls: yes

问题解决,可以正常下载scrapy库了。

你可能感兴趣的:(Anaconda An HTTP error occurred when trying to retrieve this URL.HTTP errors are often intermittent)