Registry / devops / pyinstaller-hooks-contrib

pyinstaller-hooks-contrib

JSON →
library2026.7pypypi✓ verified 27d ago

PyInstaller Hooks Contrib is a collection of community-maintained hooks that extend PyInstaller's ability to bundle complex Python applications. These hooks handle the specific packaging requirements of various third-party libraries, ensuring they work correctly when frozen into a standalone executable. The current version is 2026.4, with releases typically following a monthly cadence.

pip install pyinstaller pyinstaller-hooks-contrib
INSTALL
IMPORT
SIG · PYINSTALLER-HOOKS-
P
pyinstaller-hooks-contrib
devopspythonv2026.7
Install
2.8s avg
Import
Disk
32MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.8s · import 0.000s · 32MB
32MB installed
● package 32MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Not Applicable
This library provides hooks that PyInstaller automatically discovers and uses during the build process. Direct imports of `pyinstaller-hooks-contrib` in user application code are not performed.
Users do not directly import symbols from `pyinstaller-hooks-contrib`. Its functionality is integrated into PyInstaller when present in the environment.

To demonstrate `pyinstaller-hooks-contrib`, create a simple application that uses a library known to require complex bundling (e.g., matplotlib). Install both `pyinstaller` and `pyinstaller-hooks-contrib`. When `pyinstaller` is run on the application, the `pyinstaller-hooks-contrib` library will be automatically detected and its hooks applied, ensuring the bundled application works correctly without manual intervention for common libraries.

import matplotlib.pyplot as plt import numpy as np def create_plot(): x = np.linspace(0, 10, 100) y = np.sin(x) plt.plot(x, y) plt.title("Simple Sine Wave") plt.xlabel("X-axis") plt.ylabel("Y-axis") if __name__ == "__main__": create_plot() print("Matplotlib imported successfully (for PyInstaller testing).") # To use: # 1. Save the above code as app.py # 2. Ensure pyinstaller and pyinstaller-hooks-contrib are installed: # pip install pyinstaller pyinstaller-hooks-contrib # 3. Run PyInstaller: # pyinstaller app.py # PyInstaller will automatically use the hooks from pyinstaller-hooks-contrib to correctly bundle matplotlib and numpy.
Debug
Known issues
gotchaMany popular third-party libraries (e.g., PyQt, Kivy, matplotlib, scipy) will fail to build or run correctly when bundled with PyInstaller if `pyinstaller-hooks-contrib` is not installed, as it provides essential community-maintained hooks for these packages.
fix
Always install `pyinstaller-hooks-contrib` alongside `pyinstaller` to ensure broad compatibility: `pip install pyinstaller pyinstaller-hooks-contrib`.
affects: All versions
gotchaWhile not strictly tied, ensure that your `pyinstaller-hooks-contrib` version is relatively up-to-date with your `PyInstaller` version. Newer PyInstaller versions might expect newer hook definitions, and older `contrib` versions could lead to build issues.
fix
Periodically update both packages: `pip install --upgrade pyinstaller pyinstaller-hooks-contrib`.
affects: All versions
gotchaHooks for a specific library within `pyinstaller-hooks-contrib` might occasionally lag behind very recent versions of that third-party library. This can lead to bundling issues even with the contrib package installed.
fix
If a build fails for a newly updated library, check the `pyinstaller-hooks-contrib` GitHub issues for updates, or temporarily pin the problematic library to an older version known to work with the current hooks.
affects: All versions, specific to new library releases
Upgrade
Version history
2026.7latest on PyPI · released Aug 24, 2026
Audit
Dependencies
PyInstallerrequiredProvides community-maintained hooks that are automatically discovered and used by PyInstaller during the bundling process.
Agent activity
5 hits · last 30 days
node
4
Resources
pyinstaller-hooks-contrib — pip install pyinstaller-hooks-contrib · libregistry