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

Windows系统使用Python pip时遭遇SSL证书错误该如何解决?

Python pip SSL证书验证失败问题解决方案

报错信息

WARNING: Retrying (Retry(total=4, 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/climb/

解决步骤

  1. 找到路径 C:\Users\<firstname.lastname>\AppData\Roaming(将<firstname.lastname>替换为你的系统用户名)
  2. 创建名为“pip”的子文件夹(若已存在则直接使用)
  3. 在上述“pip”文件夹中创建名为“pip.ini”的文件
  4. 编辑pip.ini文件并保存,内容如下:
[global]
trusted-host = pypi.org pypi.python.org files.pythonhosted.org
  1. 再次尝试安装Python库或创建虚拟环境的操作

该方案已在我本人及新加坡同事的环境中验证有效,可解决此类SSL证书链自签名导致的验证失败问题。


内容的提问来源于stack exchange,提问作者YINXIONG CHEN

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.11 17:01:08