使用镜像安装pyOt5报错问题及解决

文章讲述了在使用pip安装PyQt5时遇到的安全警告和找不到合适版本的问题,解决方法是将镜像源更改为百度镜像并添加`--trusted-hostmirrors.aliyun.com`选项。同样适用于pyqt5-tools的安装。

问题描述

C:\Users\Lenovo>pip install pyqt5 -i http://mirrors.aliyun.com/pypi/simple/
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.
ERROR: Could not find a version that satisfies the requirement pyqt5 (from versions: none)
ERROR: No matching distribution found for pyqt5
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.

在这里插入图片描述

解决方案

参考已解决WARNING: Pyqt5安装报错解决
原因:镜像问题
改为如下百度镜像,如下

pip install pyQt5 -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

成功解决
在这里插入图片描述
同理安装pyqt5-tools

pip install pyqt5-tools -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值