本文介绍了CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pk gs/r/win-64/repodata.json.bz2>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要安装 Tensorflow,并尝试先添加环境.但我收到 HTTP 连接失败错误.我支持公司代理,并且已经在 .condarc 文件中很好地定义了它们.这是我得到的错误:

I need to install Tensorflow and was trying to add up environment first. But I get HTTP Connection Failed error. I'm behind a corporate proxy and already defined them well in .condarc file. Here is the error I'm getting:

C:UsersRahulDownloads>conda create -n tensorflow python=3.6 anaconda
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url
<https://repo.continuum.io/pk
gs/r/win-64/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.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io, por
t=443): Max retries exceeded with url: /pkgs/r/win-64/repodata.json.bz2 (Caused
by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0
000001A00393C88>: Failed to establish a new connection: [Errno 11002] getaddrinf
o failed',))",),)

我在他们的问题跟踪器中详细发布了这个问题:https://github.com/conda/conda/issues/7283

I posted this issue in their issue tracker here in detail:https://github.com/conda/conda/issues/7283

正如问题跟踪器中提到的,我已经尝试过重置 ssl、添加 condarc 文件等.但到目前为止还没有运气.我的代理按预期工作,并且我在 condarc 文件中的条目是正确的.也可以通过浏览器毫无问题地访问连续存储库.

As mentioned in issue tracker, I already tried resetting ssl, adding condarc file etc. But no luck so far. My proxy is working as expected and my entries in condarc file are correct. Also continuum repository is accessible via browser without issues.

conda updateconda install 之类的命令都不起作用,并且在执行时会给出相同的错误堆栈.

None of the commands like conda update or conda install works and gives the same error stack while executing.

这里可能出了什么问题?

What might be going wrong here?

推荐答案

就像我在 GitHub 问题跟踪器 中提到的,我在下面的 pip 中添加了.ini,它工作了

Like I mentioned in the GitHub issue tracker, I added below in pip.ini and it worked

trusted-host = pypi.python.org pypi.org files.pythonhosted.org

这篇关于CondaHTTPError: HTTP 000 CONNECTION FAILED for url &lt;https://repo.continuum.io/pk gs/r/win-64/repodata.json.bz2&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 21:50