others - 在 Windows 上,安装python库的问题:CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/anaconda/win-64

大家早,

我想安装pymongo库,但出现以下错误:


 (C:UsersxxxxxxxAppDataLocalContinuumanaconda3) C:Usersxxxxxxx>


 conda install -c anaconda pymongo



 Fetching package metadata.. .


 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/a


 naconda/win-64/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.



 ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', por


 t=443): Max retries exceeded with url:/anaconda/win-64/repodata.json (Caused by


 ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x000


 00000054D6128>, 'Connection to conda.anaconda.org timed out. (connect timeout=9.


 15)'))",),)



采取的步骤解决:


1. Update C:Usersxxxxxxx.condarc file with the following:



channels:


 - defaults


ssl_verify: false


proxy_servers:


http: http://sproxy.fg.xxx.com:1000


https: https://sproxy.fg.xxx.com:1000



2. (C:UsersxxxxxxxAppDataLocalContinuumanaconda3) C:Usersxxxxxxx>


 conda config --set ssl_verify False



附加说明


(C:UsersxxxxxxxAppDataLocalContinuumanaconda3) C:Usersxxxxxxx>


conda info



Current conda install:



 platform : win-64


 conda version : 4.3.27


 conda is private : False


 conda-env version : 4.3.27


 conda-build version : 3.0.22


 python version : 3.6.2.final.0


 requests version : 2.18.4


 config file : C:Usersxxxxxxx.condarc


 netrc file : None


 offline mode : False


 user-agent : conda/4.3.27 requests/2.18.4 CPython/3.6.2 Windows/7 W


indows/6.1.7601


 administrator : False



许多帖子都提示我安装 Anaconda,除了全新安装之外还有其他选项?

时间:

在cmd提示符/终端中执行以下命令:

[conda config --set ssl_verify no]

我在Windows 10 -64位上遇到了同样的问题,直观地安装了64位版本的miniconda。 但是,它会产生完全相同的错误。 安装 32位conda安装程序已解决这里问题

...