我如何将pypi设置为可信任?

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

我正在尝试使用Python轮子。当我执行pip install wheel时,它说存在要求,但是我收到此SSL错误:

(base) C:\Users\xxxx\PycharmProjects\prepay_clone>pip install wheel
Requirement already satisfied: wheel in c:\programdata\anaconda3\lib\site-packages (0.33.1)
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping

起初我忽略了它,因为轮似乎已经安装好了。但是,当我稍后运行setup.py sdist bdist_wheel时,它绝对不会输出任何内容。

提前感谢!

python pypi python-wheel
1个回答
1
投票
要回答您的问题,--trusted-host标志告诉pip不要为指定主机打扰SSL。我一直在公司网络上遇到此问题。我发现它在99%的时间内都有效:

pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install wheel

虽然我不确定这是否是您的问题,但是pip似乎告诉您已经安装了轮子。
© www.soinside.com 2019 - 2024. All rights reserved.