Conda config 报错 An HTTP error occurred when trying to retrieve this URL

问题描述

Conda config 配置清华源错误

报错:
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.


原因分析:

在channels中有不能用的源或者添加错误的源,导致不能使用正确的源从而报错


解决方案:

通过查询列出channels列表并删除过期/错误的源即可

首先,通过conda config --set show_channel_urls yes得到conda config现在在使用/已添加的源(此时不会在Anaconda Prompt里显示列表)。其次,使用everything搜索.condarc文件使用文本编辑器(txt或notepad++)打开查找错误添加的源并删除即可解决问题

删除

  • Anaconda Prompt : conda config --remove channels https://xxxxxx.xxxx.xxxxxxx.xxx.xx/xxxxxxxx/xxxx/xxxx/
  • 从文本编辑器直接删除

以上两种方法均可以去除不能正确使用的源

参考链接

答主从清华镜像源官网得到的方法,不能解决的话可以移步查看

你可能感兴趣的:(CompressAI,conda)