【错误笔记】关于Anaconda的CondaHTTPError问题-应该关注的不是CondaHTTPError

今天我创建了一个新的Conda环境 Tf ,需要安装一些模块,结果报错:

(Tf) C:\Users\xxx>conda install lxml
Collecting package metadata: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/defauls/noarch/repodata.json>
Elapsed: -

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.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'conda.anaconda.org\', port=443): Max retries exceeded with url: /defauls/noarch/repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))

CondaHTTPError 对于使用Conda的人而言应该是老朋友了,在遇到这个问题时很多人都会上网搜索 CondaHTTPError 然后看有没有解决办法。

一开始我也是这么干的,结果发现什么 “删除defaults” 之类的一点用都没有。

而最后知道我访问到一个英文网站的论坛回答时才意识到其实关键不在于CondaHTTPError,而是SSLError。须知CondaHTTPError当中包含了很多种类,光搜CondaHTTPError很难对症下药。

后来我搜了一下 “conda SSLError”,才发现原来是新建立的环境下缺少了openssl模块,下载后问题解决。

这也告诉我们当Anaconda出现CondaHTTPError问题时,应该关注的不是CondaHTTPError,而是下面细节的描述。

猜你喜欢

转载自blog.csdn.net/frostime/article/details/87903326
今日推荐