Packages and programmes

wheels

The current standard format for distributing Python libraries and programs is the use of wheels. wheels are designed to make the installation of Python code more reliable and to make dependency management easier. However, the details of creating wheels are beyond the scope of this section, but full details of the requirements and process for creating wheels can be found in Creating a distribution package.

py2exe and py2app

py2exe creates standalone Windows applications and py2app does the same for macOS. In both cases, these are single executables that can run on machines that do not have Python installed. In many ways, however, standalone executables are not ideal, as they tend to be larger and less flexible than native Python applications, but in some situations they can also be the best or only solution.

freeze

The freeze tool also creates an executable Python programme that runs on computers that do not have Python installed. If you want to use the freeze tool, you will probably need to download the Python source code.

Freezing a Python program creates C files that are then compiled and linked with a C compiler that you must have installed on your system. The application thus frozen will only run on platforms for which the C compiler used provides its executables.

See also

PyInstaller and PyOxidizer

PyInstaller and PyOxidizer bundle a Python application and all its dependencies into a single package.

Briefcase

Briefcase is a tool for converting a Python project into a standalone native application for Mac, Windows, Linux, iPhone/iPad and Android.