PyInstaller Manual
- Version:
PyInstaller 6.17.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, 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:
pipinstall-Upyinstaller
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:
pyinstalleryour_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.executableto spawn subprocesses that outlive the application process / Implementing application restart sys.stdin,sys.stdout, andsys.stderrinnoconsole/windowedApplications (Windows only)
- Run-time Information
- Using Spec Files
- Spec File Operation
- Adding Files to the Bundle
- Specifying Python Interpreter Options
- Spec File Options for a macOS Bundle
- POSIX Specific Options
- The
SplashTarget - Multipackage Bundles
- Globals Available to the Spec File
- Adding parameters to spec files
- Using shared code and configuration in 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.17.0 (2025年11月24日)
- 6.16.0 (2025年09月13日)
- 6.15.0 (2025年08月03日)
- 6.14.2 (2025年07月04日)
- 6.14.1 (2025年06月08日)
- 6.14.0 (2025年06月03日)
- 6.13.0 (2025年04月15日)
- 6.12.0 (2025年02月08日)
- 6.11.1 (2024年11月10日)
- 6.11.0 (2024年10月15日)
- 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.17.0
- Contributions to PyInstaller 6.16.0
- Contributions to PyInstaller 6.15.0
- Contributions to PyInstaller 6.14.2
- Contributions to PyInstaller 6.14.1
- Contributions to PyInstaller 6.14.0
- Contributions to PyInstaller 6.13.0
- Contributions to PyInstaller 6.12.0
- Contributions to PyInstaller 6.11.1
- Contributions to PyInstaller 6.11.0
- 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