Anaconda TensorFlow 安装错误 "HTTP"如何解决?

Anaconda TensorFlow Installation Error "HTTP"How to fix?

我试图通过创建环境来安装 Tensorflow,但由于我的自签名证书出现错误。我用 pip 解决了这个问题,但我不知道如何用 Anaconda 解决这个问题。

错误是:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_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.

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/main/win-64/current_repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')])")))'))

我试图找到修复该问题的命令,但找不到。我应该能够毫无问题地创建环境。

我在网上搜索了一下,发现了一些与 Conda 问题相关的内容。 在执行 1) 和 2) 步骤之前,只需键入

conda config --set ssl_verify no

然后执行以下操作:

  1. 通过键入创建新环境(可选)

    conda create -n tensorflow pip python=3.7 activate tensorflow

  2. 安装 Tensorflow 1.9

    pip install --ignore-installed --upgrade tensorflow==1.9

我没有收到任何错误。如果您有错误,请在下方评论。