Which is better - PyInstaller or cx_Freeze?

19,678

Solution 1

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.

Solution 2

Why not use something like 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.

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

Share:
19,678
Mridang Agarwalla
Author by

Mridang Agarwalla

I'm a software developer who relishes authoring Java and Python, hacking on Android and toying with AppEngine. I have a penchant for development and a passion for the business side of software. In between all the work, I contribute to a number of open-source projects, learn to master the art of cooking Asian cuisine and try to stay sane while learning to fly my Align Trex-600 Nitro Heli.

Updated on June 28, 2022

Comments

  • Mridang Agarwalla
    Mridang Agarwalla almost 2 years

    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:

    1. Popularity (i.e. larger user base)
    2. Footprint of the built binary
    3. Cross platform compatibility
    4. Ease of use
  • endolith
    endolith about 12 years
    I tried this with py2exe, cx_freeze, pyinstaller, and nothing worked. :(
  • swdev
    swdev almost 9 years
    Managing hidden import is something that really confusing with PyInstaller. I will test cx_freeze for this reason alone. Thanks!