【发布时间】:2020-11-09 06:28:04
【问题描述】:
我试图在 PyCharm 中安装 python 包。但我看不到任何最新版本如下:
我使用 pip 安装了一些软件包,但它无法正常工作并显示:
(base) C:\>pip install auto-py-to-exe
Collecting auto-py-to-exe
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: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
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: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/auto-py-to-exe/
Could not fetch URL https://pypi.org/simple/auto-py-to-exe/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/auto-py-to-exe/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping
然后我尝试使用受信任的主机 cmd:
(base) C:>pip install auto-py-to-exe --trusted-host pypi.org --trusted-host files.pythonhosted.org
然后显示“找不到满足auto-py-to-exe要求的版本(来自版本:) 找不到与 auto-py-to-exe 匹配的发行版"
所以我尝试给它一个版本命令: (base) C:>pip install auto-py-to-exe from 版本 2.7.5 --trusted-host pypi.org --trusted-host files.pythonhosted.org 但是这里仍然显示相同的问题:
Collecting auto-py-to-exe
Could not find a version that satisfies the requirement auto-py-to-exe (from versions: )
No matching distribution found for auto-py-to-exe
那我出去了……所以如果有人有任何想法,请帮忙。非常感谢。
【问题讨论】:
-
Pycharm 就是这么烦人。如果只是针对单个项目,可以在pycharm里面打开python shell试试。
-
检查你的 pip 版本。
-
pip 版本是 10.0.1,干杯
-
将您的点子升级到最新版本
标签: python pycharm anaconda package pyinstaller