python - Anaconda 中的 CONDAHTTPERROR 和 SSLERROR
问题描述
问题:
在安装或创建环境时,我遇到了相同类型的错误。我已经卸载并重新安装了 anaconda 7-8 次,仍然无法解决这个问题。
脚本:
(base) C:\Users\Ritesh>conda create --name tensorflow python=3.6
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/msys2/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/msys2/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
请以最好的方式帮助我。
解决方案
谷歌搜索错误会产生这个 GitHub 问题。
特别是,最后一条评论应该可以帮助您通过更新到带有此问题的补丁的更新版本的 Python 来解决问题。将其复制到此处以避免仅链接的答案:
最新版本的 Python 有一个新补丁,可以帮助解决这个问题 [...]。
python的固定版本是:
- 2.7.15 构建 7
- 3.6.8 构建 1
- 3.7.2 构建 2
更新到这些版本后,您应该能够删除为使 conda 工作而添加的任何解决方法。作为让 conda 安装更新的 python 的另一种解决方法,您可以从https://repo.continuum.io/pkgs/main/win-64/手动下载它并告诉 conda 直接安装文件。例如,对于 python 3.7:
conda install c:\Users\you\Downloads\python-3.7.2-h8c8aaf0_2.tar.bz2
这不会为您安装依赖项,因此绝对不要尝试以这种方式切换 python 版本(即,如果您已经拥有 3.7.x,请下载 3.7.2 包,而不是 3.6.8 或 2.7.15)。
推荐阅读
- powerbi - 列的 Power BI 编码 UTF8
- javascript - 如何在域的子路径下的 Next.js 应用程序上使用自定义字体?
- delphi - 如何通过 Clever Internet Suite 接收响应正文
- python - using map with None type functions
- windows-10 - Driver on Visual Studio Extensions Menu?
- visual-studio-code - Is there a way to enable a REPL console for the jupyter notebook in vscode
- excel - Select Text in between 2 given lengths
- android - 如何更改 NativeScript 中选定文本的文本字体、大小和格式?
- docker - docker无法初始化docker桌面正在关闭我该如何修复它
- asp.net - 文件如何添加到 docker 容器中