下载安装发布PyQt5程序

下载安装发布PyQt5程序


  1. 安装PyQt5
    pip isntall pyqt5

  2. 编写demo

  3. 用pyinstaller打包成exe发布
    pyinstaller demo.py -F -w --icon=demo.ico
    运行时候会报错failed to execute script pyi_rth_qt5plugins
    下载安装发布PyQt5程序_第1张图片


pyinstaller打包使用pyqt5模块的时候,在win平台下,由于pyinstaller无法准确获取QT动态库文件路径,会报错导致无法打开运行程序,并提示错误信息pyinstaller failed to execute script pyi_rth_qt5plugins此时我们需要在打包的时候直接告诉pyinstaller到哪里去找,这个路径分隔符需要是unix形式:

pyinstaller --paths C:/****/Python/Python35-32/Lib/site-packages/PyQt5/Qt/bin -F -w --icon=demo.ico demo.py 

你可能感兴趣的:(Python,pyqt,发布)