pyqt5在xp下的配置

qt支持库得下载,pip的不行, designer在这个里面
https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4.1/
python只能用3.4.3,自己下载

pyinstall需要的pywin32也要手工下载,不能pip,需要32位的

https://sourceforge.net/projects/pywin32/files/pywin32/

更新pip先

python -m pip install -U pip setuptools

打包命令

pyinstaller -w -F ./main.py
如果遇到下面这样的问题
This application failed to start because it could not find or load the Qt platform plugin "windows".
需要配置环境变量
QT_QPA_PLATFORM_PLUGIN_PATH
$PYTHON_DIRLibsite-packagesPyQt5plugins

或者

$PYTHON_DIRLibsite-packagesPyQt5pluginsplatforms
复制到exe所在路径,里面的dll貌似只需要qwindows.dll
原文地址:https://www.cnblogs.com/ziyouchutuwenwu/p/8572118.html