You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

pip安装seaborn失败:SSL证书验证错误及无匹配版本问题

无法安装Seaborn:SSL证书验证失败且找不到匹配版本

我尝试在gan虚拟环境中安装Seaborn,执行命令:

(gan) # pip install seaborn

出现以下SSL证书验证错误:

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))': /simple/seaborn/
Could not fetch URL https://pypi.org/simple/seaborn/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/seaborn/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)'))) - skipping
ERROR: Could not find a version that satisfies the requirement seaborn (from versions: none)
ERROR: No matching distribution found for seaborn

我推测是防火墙拦截导致的,于是添加信任主机(指定python3避免与Python2冲突),执行命令:

(gan) # python3 -m pip install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org seaborn

但仍然失败,报错:

ERROR: Could not find a version that satisfies the requirement seaborn (from versions: none)
ERROR: No matching distribution found for seaborn

补充尝试:我还尝试升级pip,执行命令:

python3 -m pip install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade pip

但提示pip已是最新版本:

Requirement already satisfied: pip in ./gan/lib/python3.9/site-packages (22.3.1)

请求解决该安装失败的问题。

内容的提问来源于stack exchange,提问作者Utkarsh Goel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 12:55:25