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
相关推荐
mahuifa44 分钟前
(7)python开发经验
python·qt·pyside6·开发经验
学地理的小胖砸2 小时前
【Python 操作 MySQL 数据库】
数据库·python·mysql
安迪小宝2 小时前
6 任务路由与负载均衡
运维·python·celery
Blossom.1182 小时前
使用Python实现简单的人工智能聊天机器人
开发语言·人工智能·python·低代码·数据挖掘·机器人·云计算
lisw052 小时前
Python高级进阶:Vim与Vi使用指南
python·vim·excel
ayiya_Oese2 小时前
[模型部署] 3. 性能优化
人工智能·python·深度学习·神经网络·机器学习·性能优化
SoraLuna3 小时前
「Mac畅玩AIGC与多模态40」开发篇35 - 用 Python 开发服务对接 SearxNG 与本地知识库
python·macos·aigc
noravinsc3 小时前
redis是内存级缓存吗
后端·python·django
王学政23 小时前
LlamaIndex 第九篇 Indexing索引
人工智能·python
百锦再4 小时前
大数据技术的主要方向及其应用详解
大数据·linux·网络·python·django·pygame