Introduction to cx_Freeze

In this chapter, we will be learning about cx_Freeze, a cross-platform set of scripts designed to freeze Python scripts into executables in a manner similar to py2exe, PyInstaller, etc. We will freeze one console script and one window (i.e GUI) script, using the examples from the previous chapter. The cx_Freeze tool is the only binary creation tool that can work with both Python 2.x and 3.x on multiple operating systems at this time. We will be using it with Python 2.7 in this chapter only because we want to compare it directly to the other binary creation tools.

You can install cx_Freeze using one of their Windows installers, via their provided Linux RPMs, via a source RPM or directly from source. You can also use pip to install cx_Freeze.

Note: I tested on Windows 7 using Python 2.7.3, wxPython (classic) and cx_Freeze 4.3.2.

Get hands-on with 1200+ tech skills courses.