我尝试安装库时如何修复python中的SSL错误? [重复]

问题描述 投票:-1回答:1

这个问题在这里已有答案:

我有一段时间面临这个错误!我正在使用python 3.7.3和pip版本19.0.3。

当我尝试安装任何python库时出现此错误:

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SS
LCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1056)'))': /simple/fpdf/

我已经尝试添加此命令:

--trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org

但它不起作用!我该如何解决这个错误?这是错误图像error

python ssl pip package
1个回答
0
投票

您需要升级点,然后它将安装新证书:

python -m pip install --upgrade pip
© www.soinside.com 2019 - 2024. All rights reserved.