How to Install PyInstaller¶
PyInstaller is available as a regular Python package. The source archives for released versions are available from PyPi, but it is easier to install the latest version using pip:
pip install pyinstaller
To upgrade existing PyInstaller installation to the latest version, use:
pip install --upgrade pyinstaller
To install the current development version, use:
pip install https://github.com/pyinstaller/pyinstaller/tarball/develop
To install directly using pip’s built-in git checkout support, use:
pip install git+https://github.com/pyinstaller/pyinstaller
or to install specific branch (e.g.,
pip install git+https://github.com/pyinstaller/pyinstaller@develop
Installing from the source archive¶
The source code archive for released versions of PyInstaller are available at PyPI and on PyInstaller Downloads page.
Even though the source archive provides the
python setup.py install has been deprecated
and should not be used anymore. Instead, run
pip install . from
the unpacked source directory, as described below.
- The installation procedure is:
Unpack the source archive.
Move into the unpacked source directory.
pip install .from the unpacked source directory. If installing into system-wide python installation, administrator privilege is required.
The same procedure applies to installing from manual git checkout:
git clone https://github.com/pyinstaller/pyinstaller cd pyinstaller pip install .
If you intend to make changes to the source code and want them to take effect immediately, without re-installing the package each time, you can install it in editable mode:
pip install -e .
For platforms other than Windows, GNU/Linux and macOS, you must first
build the bootloader for your platform: see Building the Bootloader.
After the bootloader has been built, use the
pip install . command
to complete the installation.
Verifying the installation¶
On all platforms, the command
pyinstaller should now exist on the
execution path. To verify this, enter the command:
The result should resemble
4.n for a released version,
4.n.dev0-xxxxxx for a development branch.
If the command is not found, make sure the execution path includes the proper directory:
C:\PythonXY\Scriptswhere XY stands for the major and minor Python version number, for example
C:\Python38\Scriptsfor Python 3.8)
macOS (using the default Apple-supplied Python)
macOS (using Python installed by homebrew)
macOS (using Python installed by macports)
To display the current path in Windows the command is
and in other systems,
If you cannot use the
pyinstaller command due to the scripts
directory not being in
PATH, you can instead invoke the
PyInstaller module, by running
python -m PyInstaller
(pay attention to the module name, which is case sensitive).
This form of invocation is also useful when you have PyInstaller
installed in multiple python environments, and you cannot be sure
from which installation the
pyinstaller command will be ran.
The complete installation places these commands on the execution path:
pyinstalleris the main command to build a bundled application. See Using PyInstaller.
pyi-makespecis used to create a spec file. See Using Spec Files.
pyi-archive_vieweris used to inspect a bundled application. See Inspecting Archives.
pyi-bindependis used to display dependencies of an executable. See Inspecting Executables.
pyi-grab_versionis used to extract a version resource from a Windows executable. See Capturing Windows Version Data.
pyi-set_versioncan be used to apply previously-extracted version resource to an existing Windows executable.