Installer is a low-level library from the Python Packaging Authority (PyPA) designed for installing Python wheel distributions. It provides fundamental abstractions and functionality for unpacking wheels and generating platform-independent Python script wrappers. As a core PyPA tool, it is actively maintained with releases occurring as new functionality, bug fixes, or compatibility updates are needed.
pip install installerVerified import paths — ran on the pinned version, not inferred.
The quickstart demonstrates how to use `installer` to install a Python wheel (.whl) file. It involves defining a `SchemeDictionaryDestination` based on `sysconfig.get_paths()` for standard installation locations, opening a wheel file with `WheelFile.open`, and then calling the `install` function with the source and destination. This is a low-level operation requiring a wheel file path.
Upgrade to Python 3.7+ or pin `installer` to a version `<0.5.0`.
Update custom code to expect tuples `(path, hash, size)` instead of `RecordEntry` objects when using `parse_record_file`.
Understand `installer`'s scope; for end-user package management, use tools like `pip` or `uv`.
Always use `installer >= 0.2.0` which is from the official PyPA project.
Install the library using pip: `pip install installer`
This is a known issue (e.g., pypa/installer#121) where the installer does not automatically handle existing files during reinstallation. A workaround might involve manually cleaning the target directory before installation or using higher-level tools like pip that manage uninstallation/installation more robustly. If using `installer` directly, ensure the destination is clean or implement a pre-uninstall step for existing files.
Ensure the wheel file (`.whl`) you are attempting to install is correctly formatted and not corrupted. If you are building the wheel yourself, verify your build backend configuration (e.g., `pyproject.toml`, `setup.py`) adheres to Python packaging standards. If downloading, try obtaining the wheel from a trusted source or rebuilding it.