Anaconda 遇到 SSL 错误怎么办?

你在使用 Anaconda 时是否遇到过以下错误信息?

Retrieving notices: ...working... doneCollecting package metadata (current_repodata.json): ...working... failed

Note: you may need to restart the kernel to use updated packages.ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/r/notices.json (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))> for channel: defaults url: https://repo.anaconda.com/pkgs/r/notices.jsonERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/msys2/notices.json (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))> for channel: defaults url: https://repo.anaconda.com/pkgs/msys2/notices.jsonERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/notices.json (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))> for channel: defaults url: https://repo.anaconda.com/pkgs/main/notices.json

CondaSSLError: Encountered an SSL error. Most likely a certificate verification issue.

Exception: HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/win-64/current_repodata.json (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))

这个错误通常是由于 SSL 证书验证问题导致的,可能是网络连接问题或 Anaconda 配置问题引起的。别担心,试试以下解决方案:

1. 检查网络连接

  • 确保你的网络连接正常。- 尝试重新连接网络或使用其他网络。

2. 检查 Anaconda 配置

  • 尝试更新或重新安装 Anaconda,修复可能的配置问题。- 你可以在 Anaconda 官方网站 上找到最新版本,并按照官方指南进行安装。

3. 检查 SSL 证书

  • SSL 证书可能过期或损坏,导致 SSL 错误。- 尝试更新或重新安装 SSL 证书。- 具体步骤可能因操作系统而异,你可以在操作系统的官方文档或 SSL 证书提供方网站上找到相关指南。

4. 禁用 SSL 验证 (不推荐)

警告: 禁用 SSL 验证会降低安全性,仅在其他方法无效时才考虑使用。

你可以在 Anaconda 的配置文件中添加以下内容来禁用 SSL 验证:

ssl_verify: false

寻求帮助

如果以上方法都无效,建议向 Anaconda 官方支持 寻求帮助,他们可能能够提供更具体的解决方案。

Anaconda SSL 错误解决办法:'[SSL: WRONG_VERSION_NUMBER] wrong version number'

原文地址: https://www.cveoy.top/t/topic/emTI 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录