How to build PyQT project?

落花浮王杯 提交于 2019-12-05 23:57:48

问题


I have a simple PyQT project. I would like to know how to build it in Windows in such way, that it becomes runnable executable. I don't want to require user to install heavy QT framework for his computer. How to make executable with only necessary parts of QT?


回答1:


I use py2exe for deploying a Windows standalone GUI cross-platform (under Linux, all the python libs are available on the Linux hosts). You run the py2exe "setup" to build an .exe+, and py2exe pulls the binary bits and your python code and builds into a loadable, runnable Windows executable pack.

Python 2.5 on windows was the long-time requirement, but the recent 0.6.9 release added python2.6 (and python2.7?) support. No python3 yet.

Also, you may want to consult Py2exeAndPyQt on py2exe wiki.




回答2:


In addition to py2exe and cx-Freeze, check out PyInstaller.




回答3:


Have you looked at py2exe, cxFreeze or other python packaging apps? They weed out the needed dlls by looking at what you use.



来源:https://stackoverflow.com/questions/602076/how-to-build-pyqt-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!