当我分发我的应用程序时,是否需要捆绑 Python 解释器(在 py2exe 中)?

发布于 2024-10-07 15:07:08 字数 248 浏览 0 评论 0原文

我准备好了一个小型 Python 应用程序,我想将其分发给公司里的朋友。

我使用 wxWidgets 作为 GUI,使用 SQLite 作为数据库。

我计划使用 py2exe 来打包整个东西。

我想知道是否需要捆绑Python解释器? py2exe 默认这样做吗?我的朋友不会在他们的系统上安装 Python。

我应该为 GUI 捆绑任何额外的库吗?

我希望它只在 Windows 上运行,而不是其他。

I have a small Python app ready that I'd like to distribute around to my friends in the company.

I have used wxWidgets for the GUI, with SQLite for the database.

I'm planning on using py2exe for packaging the entire thing.

I'd like to know if bundling the Python interpreter is required ? Does py2exe does it by default ? My friends wont have Python installed on their systems.

Are there any extra libraries that I should bundle for the GUI ?

I want this to run only on Windows, nothing else.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

予囚 2024-10-14 15:07:08

上次我这样做时(诚然是在不久前),py2exe 将所有内容都捆绑到可执行文件中。

这个相当简洁的文档讨论了外部依赖项,例如 MSVC 运行时 DLL。

我还建议查看以下过去的问题:

如果我如果是你的话,我会尝试一下,如果事情没有按照你的预期进行,我会带着具体问题回来。

Last time I did it (which admittedly was some time ago), py2exe bundled everything into the executable.

This fairly concise document talks about external dependencies, such MSVC runtime DLLs.

I also suggest taking a look at the following past questions:

If I were you, I'd give it a shot and come back with specific questions if things don't work as you expect.

如若梦似彩虹 2024-10-14 15:07:08

py2exe 必须捆绑 Python 解释器——否则,没有 Python 的朋友怎么会在没有它的情况下使用你的程序呢?但它确实如此,当然。

py2exe 主要包含根据导入到应用程序中的内容需要包含的内容,因此如果您在那里导入 sqlite3,它将被包含在内。我会尝试使用 GUI2Exe,它使使用 py2exe 更加直观和容易。

py2exe must bundle the Python interpreter--how else would your friends without Python use your program without it? But it does, of course.

py2exe mostly includes what needs to be included based on what is imported into your app, so if you have import sqlite3 in there, it will be included. I'd try using GUI2Exe, it makes using py2exe so much more intuitive and easier.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文