pip install PyQt5 ssl error

Could not fetch URL https://pypi.org/simple/pyqt5/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyqt5/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)'))) - skipping 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: unable to get local issuer certificate (_ssl.c:1007)'))': /simple/pyqt5/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:990: The handshake operation timed out'))': /simple/pyqt5/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('timed out'))': /simple/pyqt5/ WARNING: 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:1007)'))': /simple/pyqt5/ WARNING: 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:1007)'))': /simple/pyqt5/ ERROR: Could not find a version that satisfies the requirement PyQt5 (from versions: none) ERROR: No matching distribution found for PyQt5

pip install PyQt5

报错

这个错误通常是由于Python环境的SSL证书配置问题引起的。您可以尝试以下几种方法来解决这个问题:

  1. **更新pip:** 首先,尝试更新pip到最新版本,因为较新版本的pip可能会修复一些SSL证书验证问题。您可以使用以下命令来更新pip:

```

python -m pip install --upgrade pip

```

  1. **更新证书:** 如果您使用的是较旧的Python版本,可能需要更新根证书。您可以手动下载最新的根证书,并按照Python文档中的步骤安装它们。您可以在这里找到Python文档:[Installing Certificates](https://docs.python.org/3/library/ssl.html#certificates)

  2. **禁用SSL证书验证:** 尽管不建议这样做,但是您可以在pip安装时暂时禁用SSL证书验证。在命令行中执行以下命令:

```

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org pyqt5

```

请注意,禁用SSL证书验证存在一定的安全风险,因为它可能会使您的连接容易受到中间人攻击。

  1. **使用代理:** 如果您在网络环境中使用了代理,请确保pip能够正确配置和使用代理。您可以在pip的配置文件中设置代理信息,或者在命令行中使用 `--proxy` 选项。

尝试以上方法中的一个或多个,看看是否能够解决您的问题。如果问题仍然存在,请提供更多细节,以便我能够更好地帮助您解决。

终极解决打法
shiboken2 · PyPI whl文件下载

然后安装,可能会依赖文件有些把依赖的文件安装

bash 复制代码
pip install  C:\Users\Downloads\PyQt5-5.15.10-cp37-abi3-win_amd64.whl
相关推荐
Zoey的笔记本29 分钟前
敏捷与稳定并行:Scrum看板+BPM工具选型指南
大数据·前端·数据库·python·低代码
开开心心就好2 小时前
图片格式转换工具,右键菜单一键转换简化
linux·运维·服务器·python·django·pdf·1024程序员节
骥龙2 小时前
1.2下、工欲善其事:物联网安全研究环境搭建指南
python·物联网·安全
Lxinccode2 小时前
BUG(20) : response.text耗时很久, linux耗时十几秒, Windows耗时零点几秒
python·bug·requests·response.text·response.text慢
智航GIS2 小时前
11.2 Matplotlib 数据可视化教程
python·信息可视化·matplotlib
技术净胜2 小时前
Python 操作 Cookie 完全指南,爬虫与 Web 开发实战
前端·爬虫·python
海棠AI实验室2 小时前
第六章 日志体系:logging 让排错效率翻倍
python·logging
laufing2 小时前
flask_restx 创建restful api
python·flask·restful
毕设源码-郭学长3 小时前
【开题答辩全过程】以 基于python电商商城系统为例,包含答辩的问题和答案
开发语言·python