PyInstaller Manual
- Version:
PyInstaller 6.10.0
- Homepage:
- Contact:
- Authors:
David Cortesi, based on structure by Giovanni Bajo & William Caban, based on Gordon McMillan’s manual
- Copyright:
This document has been placed in the public domain.
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. PyInstaller supports Python 3.8 and newer, and correctly bundles many major Python packages such as numpy, matplotlib, PyQt, wxPython, and others.
PyInstaller is tested against Windows, MacOS X, and Linux. However, it is not a cross-compiler; to make a Windows app you run PyInstaller on Windows, and to make a Linux app you run it on Linux, etc. x PyInstaller has been used successfully with AIX, Solaris, FreeBSD and OpenBSD but testing against them is not part of our continuous integration tests, and the development team offers no guarantee (all code for these platforms comes from external contributions) that PyInstaller will work on these platforms or that they will continue to be supported.
Quickstart
Make sure you have the Requirements installed, and then install PyInstaller from PyPI:
pip install -U pyinstaller
Open a command prompt/shell window, and navigate to the directory where your .py file is located, then build your app with the following command:
pyinstaller your_program.py
Your bundled application should now be available in the dist folder.
Note
See Troubleshooting missing PyInstaller command if you get some kind of pyinstaller command not found error.
Contents:
- Requirements
- License
- How To Contribute
- How to Install PyInstaller
- What PyInstaller Does and How It Does It
- Using PyInstaller
- Common Issues and Pitfalls
- Requirements Imposed by Symbolic Links in Frozen Application
- Launching External Programs from the Frozen Application
- Multi-processing
- Using
sys.executable
to spawn subprocesses that outlive the application process / Implementing application restart sys.stdin
,sys.stdout
, andsys.stderr
innoconsole
/windowed
Applications (Windows only)
- Run-time Information
- Using Spec Files
- Notes about specific Features
- Ctypes Dependencies
- SWIG support
- Cython support
- Bytecode Optimization Level
- macOS multi-arch support
- macOS binary code signing
- macOS event forwarding and argv emulation in app bundles
- Signal handling in console Windows applications and onefile application cleanup
- Automatic hiding and minimization of console window under Windows
- When Things Go Wrong
- Advanced Topics
- Understanding PyInstaller Hooks
- How a Hook Is Loaded
- Providing PyInstaller Hooks with your Package
- Hook Global Variables
- Useful Items in
PyInstaller.compat
- Useful Items in
PyInstaller.utils.hooks
- Subprocess isolation with
PyInstaller.isolated
- The
hook(hook_api)
Function - The
pre_find_module_path( pfmp_api )
Method - The
pre_safe_import_module( psim_api )
Method
- Hook Configuration Options
- Building the Bootloader
- Changelog for PyInstaller
- 6.10.0 (2024-08-10)
- 6.9.0 (2024-07-06)
- 6.8.0 (2024-06-08)
- 6.7.0 (2024-05-21)
- 6.6.0 (2024-04-13)
- 6.5.0 (2024-03-09)
- 6.4.0 (2024-02-10)
- 6.3.0 (2023-12-10)
- 6.2.0 (2023-11-11)
- 6.1.0 (2023-10-13)
- 6.0.0 (2023-09-22)
- 5.13.2 (2023-08-29)
- 5.13.1 (2023-08-26)
- 5.13.0 (2023-06-24)
- 5.12.0 (2023-06-08)
- 5.11.0 (2023-05-13)
- 5.10.1 (2023-04-14)
- 5.10.0 (2023-04-11)
- 5.9.0 (2023-03-13)
- 5.8.0 (2023-02-11)
- 5.7.0 (2022-12-04)
- 5.6.2 (2022-10-31)
- 5.6.1 (2022-10-25)
- 5.6 (2022-10-23)
- 5.5 (2022-10-08)
- 5.4.1 (2022-09-11)
- 5.4 (2022-09-10)
- 5.3 (2022-07-30)
- 5.2 (2022-07-08)
- 5.1 (2022-05-17)
- 5.0.1 (2022-04-25)
- 5.0 (2022-04-15)
- 4.10 (2022-03-05)
- 4.9 (2022-02-03)
- 4.8 (2022-01-06)
- 4.7 (2021-11-10)
- 4.6 (2021-10-29)
- 4.5.1 (2021-08-06)
- 4.5 (2021-08-01)
- 4.4 (2021-07-13)
- 4.3 (2021-04-16)
- 4.2 (2021-01-13)
- 4.1 (2020-11-18)
- 4.0 (2020-08-08)
- Older Versions
- Credits
- Contributions to PyInstaller 6.10.0
- Contributions to PyInstaller 6.9.0
- Contributions to PyInstaller 6.8.0
- Contributions to PyInstaller 6.7.0
- Contributions to PyInstaller 6.6.0
- Contributions to PyInstaller 6.5.0
- Contributions to PyInstaller 6.4.0
- Contributions to PyInstaller 6.3.0
- Contributions to PyInstaller 6.2.0
- Contributions to PyInstaller 6.1.0
- Contributions to PyInstaller 6.0.0
- Contributions to PyInstaller 5.13.2
- Contributions to PyInstaller 5.13.1
- Contributions to PyInstaller 5.13.0
- Contributions to PyInstaller 5.12.0
- Contributions to PyInstaller 5.11.0
- Contributions to PyInstaller 5.10.1
- Contributions to PyInstaller 5.10.0
- Contributions to PyInstaller 5.9.0
- Contributions to PyInstaller 5.8.0
- Contributions to PyInstaller 5.7.0
- Contributions to PyInstaller 5.6.2
- Contributions to PyInstaller 5.6.1
- Contributions to PyInstaller 5.6
- Contributions to PyInstaller 5.5
- Contributions to PyInstaller 5.4.1
- Contributions to PyInstaller 5.4
- Contributions to PyInstaller 5.3
- Contributions to PyInstaller 5.2
- Contributions to PyInstaller 5.1
- Contributions to PyInstaller 5.0.1
- Contributions to PyInstaller 5.0
- Contributions to PyInstaller 4.10
- Contributions to PyInstaller 4.9
- Contributions to PyInstaller 4.8
- Contributions to PyInstaller 4.7
- Contributions to PyInstaller 4.6
- Contributions to PyInstaller 4.5.1
- Contributions to PyInstaller 4.5
- Contributions to PyInstaller 4.4
- Contributions to PyInstaller 4.3
- Contributions to PyInstaller 4.2
- Contributions to PyInstaller 4.1
- Contributions to PyInstaller 4.0
- Contributions to PyInstaller 3.6
- Contributions to PyInstaller 3.5
- Contributions to PyInstaller 3.4
- Contributions to PyInstaller 3.3.1
- Contributions to PyInstaller 3.3
- Contributions to PyInstaller 3.2.1
- Contributions to PyInstaller 3.2
- Contributions to PyInstaller 3.1.1
- Contributions to PyInstaller 3.1
- Contributions to PyInstaller 3.0
- Contributions to PyInstaller 2.1 and older
- Man Pages
- Development Guide