PyInstaller 和 cx_Freeze 哪个更好?
有人可以告诉我对于捆绑 Python 应用程序来说,cx_Freeze 或 PyInstaller 这两者中哪一个更好?我正在寻找基于以下因素的比较:
- 受欢迎程度(即更大的用户群)
- 构建的二进制文件的占用空间
- 跨平台兼容性
- 易用性
Could someone tell me which is better of the two for bundling Python applications — cx_Freeze or PyInstaller? I'm looking for a comparison based on factors such as:
- Popularity (i.e. larger user base)
- Footprint of the built binary
- Cross platform compatibility
- Ease of use
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在当前项目中尝试了这两种方法,并决定使用 cx_freeze。我发现更容易上手。它可以选择将依赖项捆绑到 zip 存档中,这样可以轻松检查所有内容是否已正确包含。
我无法让 PyInstaller 包含某些 Egg 依赖项。它无法按照我的需要处理条件导入,并且查看捆绑的存档很困难。在 Windows 上,它需要 pywin32(因此它不能与 virtualenv 一起使用),并且版本 1.4 不能与 Python 2.6 一起使用。没有关于是否支持 Python 2.7 的信息。
I tried both for a current project and decided to use cx_freeze. I found it easier to get started. It has an option to bundle dependencies in a zip archive, which makes it easy to check that everything was properly included.
I had trouble getting PyInstaller to include certain egg dependencies. It couldn't handle conditional imports as well as I needed and looking through the bundled archive was difficult. On Windows, it requires pywin32 (so it can't be used with virtualenv) and version 1.4 doesn't work with Python 2.6. There's no information on whether Python 2.7 is supported.
为什么不使用 GUI2EXE 之类的东西?
根据我的经验,我发现对于某些程序 py2exe 无法正常工作,但 cx_freeze 可以。没有尝试过pyinstaller。
Why not use something like GUI2EXE?
For my experience, I found that for some programs py2exe doesn't work right, but cx_freeze does. haven't tried pyinstaller.