Anaconda中的CONDAHTTPERROR和SSLERROR

问题描述 投票:2回答:1

Problem:

在安装或创建环境时,我会遇到相同类型的错误。我已经卸载并安装了7到8次anaconda,仍然无法解决这个问题。

Script:

(base) C:\Users\Ritesh>conda create --name tensorflow python=3.6
Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/msys2/noarch/repodata.json.bz2>
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.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/msys2/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))

请以最好的方式帮助我。

python tensorflow anaconda jupyter-notebook http-error
1个回答
0
投票

谷歌搜索错误产生this GitHub issue

特别是,last comment应该通过更新到这个问题的补丁更新到更新版本的Python来帮助您解决问题。在此处复制以避免仅链接答案:

最新的Python版本有一个新的补丁,可以帮助解决这个问题[...]。

python的固定版本是:

  • 2.7.15构建7
  • 3.6.8构建1
  • 3.7.2构建2

更新到这些版本后,您应该能够删除为使conda工作而添加的任何变通方法。作为让conda安装更新的python的另一个解决方法,您可以从https://repo.continuum.io/pkgs/main/win-64/手动下载并告诉conda直接安装该文件。例如,使用python 3.7:

conda install c:\Users\you\Downloads\python-3.7.2-h8c8aaf0_2.tar.bz2

这不会为您安装依赖项,所以绝对不要尝试以这种方式切换python版本(即如果您已经有3.7.x,请下载3.7.2软件包,而不是3.6.8或2.7.15)。

© www.soinside.com 2019 - 2024. All rights reserved.