【问题标题】:cannot install any packages in PyCharm无法在 PyCharm 中安装任何包
【发布时间】: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


【解决方案1】:

按照以下https://datatofish.com/upgrade-pip/ 升级您的点子。

您也可以尝试手动安装:(https://pip.pypa.io/en/stable/installing/)

下载:https://bootstrap.pypa.io/get-pip.py

python get-pip.py

【讨论】:

  • 谢谢@anoop,但它不起作用。我检查了您的链接,首先我的解释器是 Anaconda 3.7。然后我仍然尝试使用cmd升级pip,然后它仍然显示错误:Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError (1, '[SSL: CERTIFICATE_VERIFY_FAILED] 要求已经是最新的:c:\programdata\anaconda\lib\site-packages (10.0.1) twisted 18.7.0 中的 pip 需要 PyHamcrest>=1.9.0,即未安装。
  • 然后我尝试安装 PyHamcrest,它显示与我的问题相同的错误...
  • @Alicejinx 您可以尝试手动安装我在上面的答案中添加了步骤。
猜你喜欢
  • 2018-06-19
  • 2022-11-25
  • 2019-01-21
  • 1970-01-01
  • 2017-02-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多