Python3 安装 PyQt5、pyqt5-tools

####################################################

环境1:

Python3.7 x86 + Win8.1 x64

安装:

python -m pip install PyQt5-sip==4.19.19
python -m pip install PyQt5==5.12.3
python -m pip install pyqt5-tools==5.12.3.1.5

或者:
python -m pip install PyQt5-sip==4.19.19 -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install PyQt5==5.12.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install pyqt5-tools==5.12.3.1.5 -i https://pypi.tuna.tsinghua.edu.cn/simple/

或者:
python -m pip install PyQt5==5.12.1
python -m pip install pyqt5-tools==5.12.3.1.5

或者:
python -m pip install PyQt5==5.12.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install pyqt5-tools==5.12.3.1.5 -i https://pypi.tuna.tsinghua.edu.cn/simple/

designer.exe 路径:

Python37-32\Lib\site-packages\pyqt5_tools\Qt\bin\designer.exe

直接安装或者高版本可能会出现的错误, 也可能不会出现, 因为 PyQt5-sip 最新版没有 Python 3.7 版本编译好的  whl, 需要下载源码编译,需要 编译环境。

虽然通过安装 VS2015 后重新安装 pyqt5 解决了这个问题,但是安装后的 designer.exe 在Win8.1 打不开

,Win10 可以,后来降低的版本,OK 。

####################################################

环境2:Python3.8 x86 + Win8.1 x64

安装:

python -m pip install PyQt5
python -m pip install pyqt5-tools

安装后版本:

PyQt5==5.15.9
pyqt5-tools==5.15.9.3.3

designer.exe 路径:

Python38-32\Lib\site-packages\qt5_applications\Qt\bin\designer.exe

附录:

使用国内源,进行快速安装:

# PyQt5 (不加版本号)
python -m pip install PyQt -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install pyqt5-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

# PyQt5 (加版本号)
python -m pip install PyQt5==5.12.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install pyqt5-tools==5.12.3.1.5 -i https://pypi.tuna.tsinghua.edu.cn/simple/

参考:

《Python Qt GUI与数据可视化编程》

PyQt完整入门教程
https://www.cnblogs.com/lovesoo/p/12491361.html

PyQt5安装以及使用教程合集(2024)
https://zhuanlan.zhihu.com/p/162866700

QT:
https://download.qt.io/archive/qt/5.12/5.12.12/

Pypi:
https://pypi.org/search/?q=PyQt5
https://pypi.org/search/?q=pyqt5-tools

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值