Registry /
devops / pyinstaller-hooks-contrib
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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.3MB
glibcpy 3.10–3.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.fixAlways 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.fixPeriodically 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.fixIf 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.