如何构建 PyQT 项目? [英] How to build PyQT project?

查看:45
本文介绍了如何构建 PyQT 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的 PyQT 项目.我想知道如何在 Windows 中以这种方式构建它,使其成为可运行的可执行文件.我不想要求用户为他的计算机安装繁重的 QT 框架.如何仅使用 QT 的必要部分使可执行文件?

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?

推荐答案

我使用 py2exe 来部署一个 Windows 独立 GUI 跨平台(在 Linux 下,所有的 python 库都可以在 Linux 主机上使用).您运行 py2exesetup"来构建 .exe+,然后 py2exe 提取二进制位和您的 Python 代码并构建到可加载、可运行的 Windows 可执行包中.

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.

Windows 上的 Python 2.5 是长期需求,但最近 0.6.9 版本 添加了 python2.6(和 python2.7?)支持.还没有python3.

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.

此外,您可能需要在 py2exe wiki 上查阅 Py2exeAndPyQt.

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

这篇关于如何构建 PyQT 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆