Anaconda中的CONDAHTTPERROR和SSLERROR

时间:2019-03-06 07:59:56

标签: python tensorflow anaconda jupyter-notebook http-error

问题:

在安装或创建环境时,出现相同类型的错误。我已经将anaconda卸载并安装了7-8次,但仍然无法解决此问题。

脚本:

(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."))'))

请以最好的方式帮助我。

1 个答案:

答案 0 :(得分: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:

     
    

feature.get('KATASTER')

  
     

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