我需要安装Tensorflow,并试图首先添加环境。但是我得到HTTP连接失败的错误。我支持一个公司代理,并且已经在.condarc文件中很好地定义了它们。下面是我遇到的错误:
C:\Users\Rahul\Downloads>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
正如问题跟踪器中提到的,我已经尝试了重新设置ssl,添加condarc文件等,但是到目前为止还没有成功。我的代理正常工作,condarc文件中的条目是正确的。此外,连续存储库可以通过浏览器访问,不存在任何问题。
像conda update
或conda install
这样的命令都不能工作,并且在执行时提供相同的错误堆栈。
这里可能出什么问题了?
发布于 2018-10-11 16:27:56
显然,当我运行config命令时,condarc文件被更新并重写为空文件。我尝试通过命令行运行代理设置和受信任的主机,但它不起作用。但是后来发现,通过命令行调用受信任的主机已经停止,所以我在pip.ini文件中添加了相同的内容。在那之后就成功了!
就像我在GitHub问题跟踪器中提到的,我在pip.ini中添加了下面的内容,它起了作用
trusted-host = pypi.python.org pypi.org files.pythonhosted.org
发布于 2019-05-05 20:06:30
我在Windows 10机器中遇到了同样的问题,下面的解决方案有助于向环境变量添加以下路径:
Anaconda3\Library\bin
Anaconda3
Anaconda3\Scripts
发布于 2020-10-20 20:21:20
在windows 10机器上:
[environment_variables][1]
https://stackoverflow.com/questions/50305725
复制相似问题