Description
# `pyinstaller-hooks-contrib`: The PyInstaller community hooks repository What happens when (your?) package doesn't work with PyInstaller? Say you have data files that you need at runtime? PyInstaller doesn't bundle those. Your package requires others which PyInstaller can't see? How do you fix that? In summary, a "hook" file extends PyInstaller to adapt it to the special needs and methods used by a Python package. The word "hook" is used for two kinds of files. A runtime hook helps the bootloader to launch an app, setting up the environment. A package hook (there are several types of those) tells PyInstaller what to include in the final app - such as the data files and (hidden) imports mentioned above. This repository is a collection of hooks for many packages, and allows PyInstaller to work with these packages seamlessly. ## Installation `pyinstaller-hooks-contrib` is automatically installed when you install PyInstaller, or can be installed with pip: ```commandline pip install -U pyinstaller-hooks-contrib ``` ## I can't see a hook for `a-package` Either `a-package` works fine without a hook, or no-one has contributed hooks. If you'd like to add a hook, or view information about hooks, please see below. ## Hook configuration (options) Hooks that support configuration (options) and their options are documented in [Supported hooks and options](hooks-config.rst). ## I want to help! If you've got a hook you want to share then great! The rest of this page will walk you through the process of contributing a hook. If you've been here before then you may want to skip to the [summary checklist](#summary) **Unless you are very comfortable with `git rebase -i`, please provide one hook per pull request!** **If you have more than one then submit them in separate pull requests.** ### Setup [Fork this repo](https://github.com/pyinstaller/pyinstaller-hooks-contrib/fork) if you haven't already done so. (If you have a fork already but its old, click the **Fetch upstream** button on your fork's homepage.) Clone and `cd` inside your fork by running the following (replacing `bob-the-barnacle` with your github username): ``` git clone https://github.com/bob-the-barnacle/pyinstaller-hoooks-contrib.git cd pyinstaller-hooks-contrib ``` Create a new branch for you changes (replacing `foo` with the name of the package): You can name this branch whatever you like. ``` git checkout -b hook-for-foo ``` If you wish to create a virtual environment then do it now before proceeding to the next step. Install this repo in editable mode. This will overwrite your current installation. (Note that you can reverse this with `pip install --force-reinstall pyinstaller-hooks-contrib`). ``` pip install -e . pip install -r requirements-test.txt pip install flake8 pyinstaller ``` Note that on macOS and Linux, `pip` may by called `pip3`. If you normally use `pip3` and `python3` then use `pip3` here too. You may skip the 2<sup>nd</sup> line if you have no intention of providing tests (but please do provide tests!). ### Add the hook Standard hooks live in the [_pyinstaller_hooks_contrib/stdhooks/](../master/_pyinstaller_hooks_contrib/stdhooks/) directory. Runtime hooks live in the [_pyinstaller_hooks_contrib/rthooks/](../master/_pyinstaller_hooks_contrib/rthooks/) directory. Simply copy your hook into there. If you're unsure if your hook is a runtime hook then it almost certainly is a standard hook. Please annotate (with comments) anything unusual in the hook. *Unusual* here is defined as any of the following: * Long lists of `hiddenimport` submodules. If you need lots of hidden imports then use [`collect_submodules('foo')`](https://pyinstaller.readthedocs.io/en/latest/hooks.html#PyInstaller.utils.hooks.collect_submodules). For bonus points, track down why so many submodules are hidden. Typical causes are: * Lazily loaded submodules (`importlib.importmodule()` inside a module `__getattr__()`). * Dynamically loaded *backends*. * Usage of `Cython` or Python extension modules containing `import` statements. * Use of [`collect_all()`](https://pyinstaller.readthedocs.io/en/latest/hooks.html#PyInstaller.utils.hooks.collect_all). This function's performance is abismal and [it is broken by design](https://github.com/pyinstaller/pyinstaller/issues/6458#issuecomment-1000481631) because it confuses packages with distributions. Check that you really do need to collect all of submodules, data files, binaries, metadata and dependencies. If you do then add a comment to say so (and if you know it - why). Do not simply use `collect_all()` just to *future proof* the hook. * Any complicated `os.path` arithmetic (by which I simply mean overly complex filename manipulations). #### Add the copyright header All source files must contain the copyright header to be covered by our terms and conditions. If you are **adding** a new hook (or any new python file), copy/paste the appropriate cop
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 2026.4 | Imported from PyPI (2026.4) | Low | 4/21/2026 |
| v2026.4 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2026.4/CHANGELOG.rst) for more details | Medium | 3/31/2026 |
| v2026.3 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2026.3/CHANGELOG.rst) for more details | Low | 3/9/2026 |
| v2026.2 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2026.2/CHANGELOG.rst) for more details | Low | 3/2/2026 |
| v2026.1 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2026.1/CHANGELOG.rst) for more details | Low | 2/18/2026 |
| v2026.0 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2026.0/CHANGELOG.rst) for more details | Low | 1/20/2026 |
| v2025.11 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.11/CHANGELOG.rst) for more details | Low | 12/23/2025 |
| v2025.10 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.10/CHANGELOG.rst) for more details | Low | 11/22/2025 |
| v2025.9 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.9/CHANGELOG.rst) for more details | Low | 9/24/2025 |
| v2025.8 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.8/CHANGELOG.rst) for more details | Low | 7/27/2025 |
| v2025.7 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.7/CHANGELOG.rst) for more details | Low | 7/22/2025 |
| v2025.6 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.6/CHANGELOG.rst) for more details | Low | 7/14/2025 |
| v2025.5 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.5/CHANGELOG.rst) for more details | Low | 6/8/2025 |
| v2025.4 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.4/CHANGELOG.rst) for more details | Low | 5/3/2025 |
| v2025.3 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.3/CHANGELOG.rst) for more details | Low | 4/16/2025 |
| v2025.2 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.2/CHANGELOG.rst) for more details | Low | 3/23/2025 |
| v2025.1 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.1/CHANGELOG.rst) for more details | Low | 1/31/2025 |
| v2025.0 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2025.0/CHANGELOG.rst) for more details | Low | 1/16/2025 |
| v2024.11 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2024.11/CHANGELOG.rst) for more details | Low | 12/23/2024 |
| v2024.10 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2024.10/CHANGELOG.rst) for more details | Low | 11/10/2024 |
| v2024.9 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2024.9/CHANGELOG.rst) for more details | Low | 10/15/2024 |
| v2024.8 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2024.8/CHANGELOG.rst) for more details | Low | 8/9/2024 |
| 2024.6 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 5/10/2024 |
| 2024.5 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 4/23/2024 |
| 2024.4 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 4/13/2024 |
| 2024.3 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 3/9/2024 |
| 2024.2 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 2/29/2024 |
| 2024.1 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 2/10/2024 |
| 2024.0 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 1/18/2024 |
| 2023.12 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 1/3/2024 |
| 2023.11 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 12/20/2023 |
| 2023.10 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 10/13/2023 |
| 2023.9 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 9/26/2023 |
| 2023.8 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 8/29/2023 |
| 2023.7 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 8/18/2023 |
| 2023.6 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 7/20/2023 |
| 2023.5 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 7/4/2023 |
| 2023.4 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 6/27/2023 |
| 2023.3 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 5/11/2023 |
| 2023.2 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 4/7/2023 |
| 2023.1 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 3/16/2023 |
| 2023.0 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 2/13/2023 |
| 2022.15 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 1/15/2023 |
| 2022.14 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 12/4/2022 |
| 2022.13 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 11/8/2022 |
| 2022.12 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 11/5/2022 |
| 2022.11 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 10/27/2022 |
| 2022.10 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 8/31/2022 |
| 2022.9 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 8/26/2022 |
| 2022.8 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 7/8/2022 |
| 2022.7 | Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details | Low | 6/7/2022 |
