PyInstaller bundles a Python application and all its dependencies into a single package.
.. image:: https://img.shields.io/pypi/v/pyinstaller :alt: PyPI :target: https://pypi.org/project/pyinstaller .. image:: https://img.shields.io/pypi/pyversions/pyinstaller :alt: PyPI - Python Version :target: https://pypi.org/project/pyinstaller .. image:: https://img.shields.io/readthedocs/pyinstaller/stable :alt: Read the Docs (version) :target: https://pyinstaller.org .. image:: https://img.shields.io/pypi/dm/pyinstaller :alt: PyPI - Downloads :target: https://pypistats.org/packages/pyinstaller
PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules.
:Documentation: https://pyinstaller.org/ :Code: https://github.com/pyinstaller/pyinstaller
PyInstaller reads a Python script written by you. It analyzes your code to discover every other module and library your script needs in order to execute. Then it collects copies of all those files -- including the active Python interpreter! -- and puts them with your script in a single folder, or optionally in a single executable file.
PyInstaller is tested against Windows, macOS, and GNU/Linux. However, it is not a cross-compiler: to make a Windows app you run PyInstaller in Windows; to make a GNU/Linux app you run it in GNU/Linux, etc. PyInstaller has been used successfully with AIX, Solaris, FreeBSD and OpenBSD, but is not tested against them as part of the continuous integration tests.
PyInstaller is available on PyPI. You can install it through pip
:
.. code:: bash
pip install pyinstaller
x86_64
, aarch64
,
i686
, ppc64le
, s390x
.x86_64
, aarch64
.glibc
or libc-bin
.binutils
.binutils
,
too.armv5
-armv7
should add piwheels as an extra index url <https://www.piwheels.org/>
_ then pip install pyinstaller
as usual.x86_64
or arm64
):
universal2
applications provided that your installation
of Python and all your dependencies are also compiled universal2
.Basic usage is very simple, just run it against your main script:
.. code:: bash
pyinstaller /path/to/yourscript.py
For more details, see the manual
_.
The following platforms have been contributed and any feedback or enhancements on these are welcome.
Before using any contributed platform, you need to build the PyInstaller
bootloader. This will happen automatically when you pip install pyinstaller
provided that you have an appropriate C compiler (typically
either gcc
or clang
) and zlib's development headers already installed.
You can find a detailed list of changes in this release
in the Changelog
_ section of the manual.
.. _manual
: https://pyinstaller.org/en/v6.3.0/
.. _Changelog
: https://pyinstaller.org/en/v6.3.0/CHANGES.html