哪个更好 - PyInstaller还是cx_Freeze?

时间:2022-12-12 18:02:51

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:

有人能告诉我哪个更适合捆​​绑Python应用程序--cx_Freeze或PyInstaller?我正在寻找基于以下因素的比较:

  1. Popularity (i.e. larger user base)
  2. 受欢迎程度(即更大的用户群)

  3. Footprint of the built binary
  4. 构建二进制文件的足迹

  5. Cross platform compatibility
  6. 跨平台兼容性

  7. Ease of use
  8. 使用方便

2 个解决方案

#1


20  

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.

我尝试了两个当前项目,并决定使用cx_freeze。我发现它更容易上手。它可以选择在zip存档中捆绑依赖项,这样可以轻松检查是否已正确包含所有内容。

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.

我无法让PyInstaller包含某些鸡蛋依赖项。它无法处理我需要的条件导入,并且难以查看捆绑的存档。在Windows上,它需要pywin32(因此它不能与virtualenv一起使用),1.4版本不适用于Python 2.6。没有关于是否支持Python 2.7的信息。

#2


3  

Why not use something like GUI2EXE?

为什么不使用像GUI2EXE这样的东西?

GUI2Exe is a Graphical User Interface frontend to all the "executable builders" available for the Python programming language. It can be used to build standalone Windows executables, Linux applications and Mac OS application bundles and plugins starting from Python scripts.

GUI2Exe是可用于Python编程语言的所有“可执行构建器”的图形用户界面前端。它可用于从Python脚本开始构建独立的Windows可执行文件,Linux应用程序和Mac OS应用程序包和插件。

For my experience, I found that for some programs py2exe doesn't work right, but cx_freeze does. haven't tried pyinstaller.

根据我的经验,我发现对于某些程序,py2exe不能正常工作,但是cx_freeze可以。没试过pyinstaller。

#1


20  

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.

我尝试了两个当前项目,并决定使用cx_freeze。我发现它更容易上手。它可以选择在zip存档中捆绑依赖项,这样可以轻松检查是否已正确包含所有内容。

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.

我无法让PyInstaller包含某些鸡蛋依赖项。它无法处理我需要的条件导入,并且难以查看捆绑的存档。在Windows上,它需要pywin32(因此它不能与virtualenv一起使用),1.4版本不适用于Python 2.6。没有关于是否支持Python 2.7的信息。

#2


3  

Why not use something like GUI2EXE?

为什么不使用像GUI2EXE这样的东西?

GUI2Exe is a Graphical User Interface frontend to all the "executable builders" available for the Python programming language. It can be used to build standalone Windows executables, Linux applications and Mac OS application bundles and plugins starting from Python scripts.

GUI2Exe是可用于Python编程语言的所有“可执行构建器”的图形用户界面前端。它可用于从Python脚本开始构建独立的Windows可执行文件,Linux应用程序和Mac OS应用程序包和插件。

For my experience, I found that for some programs py2exe doesn't work right, but cx_freeze does. haven't tried pyinstaller.

根据我的经验,我发现对于某些程序,py2exe不能正常工作,但是cx_freeze可以。没试过pyinstaller。