【问题标题】:not able to create conda environment无法创建 conda 环境
【发布时间】:2019-01-17 09:19:33
【问题描述】:

当我尝试创建环境时出现错误消息。 我已经安装了 Anaconda3,它与 python3.7 一起安装,并且我已经在我的 window10 机器上设置了环境变量。通过使用 jupyter notebook,我从事机器学习方面的工作。但我无法在其上导入 tensorflow 库。 所以我尝试安装一个环境。在我的 cmd 上我试过了

conda create -n tfp3.6 python=3.6
C:\>conda create -n tfp3.6 python=3.6
Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/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/main/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))

这是我的环境变量 this is my environment variables

请帮忙。 提前谢谢

【问题讨论】:

  • 可能是网络连接问题?
  • 添加到@JoshFriedlander,您的网络可能会阻止 anaconda 存储库。如果您使用的是工作网络,则很有可能。
  • 这听起来像是代理问题。如果您在工作网络上,他们是否有您需要连接的代理服务器?有关如何使其工作的提示,请参阅 Running conda with proxy。您需要从 IT 部门获取代理服务器信息。

标签: python anaconda


【解决方案1】:

这很可能是某些 Windows 系统上的 Python3.7 问题。

问题的根源隐藏在错误消息的尾部:"SSLError("Can\'t connect to HTTPS URL because the SSL module is not available.")"

在某些 Windows 上运行的 Python3.7 会出现此问题(我在 Windows 10 上遇到过此问题)。 解决办法是:安装使用Python3.6

附: 就我而言,我发现这个问题的一个非常棘手的表现:代码在 conda-shell 下成功运行,在 Jupyter-notebook 下成功运行,但无法从 cmd 运行,python.exe 来自 conda 安装或 conda-created 环境。

为了确保你遇到同样的问题,你可以在 cmd 中运行这一行:

python -c "导入请求;response = requests.get('https://stackoverflow.ru', cert=False); print(response);"

(假设安装了 requests 包,例如通过 cmd 执行:“pip install requests”)

这个cmd执行应该在anaconda-shell下运行成功,但是在python3.7下运行失败

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-28
    • 1970-01-01
    • 2020-01-20
    • 1970-01-01
    • 2017-04-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多