一、项目场景:
使用anaconda对python环境进行管理、创建等等操作
二、具体问题
1.环境创建失败
(1)问题描述
在创建新的conda环境时,遇到condasslerror的报错
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.
Exception: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /anaconda/pkgs/main/win-64/current_repodata.json (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”))
(2)原因分析
应该是系统缺少OpenSSL库或OpenSSL库未正确配置
(3)解决方法
无所谓直接关闭SSL的认证
- 修改配置文件.condarc
其路径一般linux下在~下,windows则是在C:\Users\你的账户名\下,
- 将
ssl_verify=false
加入到.condarc文件下。
2.找不到对应的包
(1)问题描述
安装包时,会提示找不到包
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))’: /simple/pyinstaller/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))’: /simple/pyinstaller/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))’: /simple/pyinstaller/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))’: /simple/pyinstaller/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))’: /simple/pyinstaller/
Could not fetch URL /simple/pyinstaller/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /simple/pyinstaller/ (Caused by SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))) - skipping
ERROR: Could not find a version that satisfies the requirement pyinstaller (from versions: none)
ERROR: No matching distribution found for pyinstaller
Could not fetch URL /simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:1131)’))) - skipping
WARNING: There was an error checking the latest version of pip.
(2)原因分析
这个错误通常是由于使用了代理服务器,并且代理服务器无法正常连接导致的。代理服务器可能无法连接或已被防火墙拦截。
(3)解决方法
1.检查是否开启了VPN
2.将下面的内容加入到.condarc
文件中去
trusted_hosts:
-