1、下载pyinstaller
pip install pyinstaller
2、我们前面开发的QT界面程序,在Windows 上只需要执行下面的命令,即可制作独立exe程序
pyinstaller httpclient.py --noconsole --hidden-import PySide2.QtXml
这样就会在当前目录下产生一个名为 dist 的目录。里面就有一个名为 httpclient 的目录,我们的可执行程序 httpclient.exe 就在里面。
3、注意把ui文件也放在文件夹内
python 打包QT程序
最新推荐文章于 2025-01-10 14:43:46 发布