patchelf
A small utility to modify the dynamic linker and RPATH of ELF executables.
Decision gist · record as of 2026-08-14
Yes, if you need patchelf in a Python environment or build pipeline. It offers zero runtime dependencies, active maintenance, and broad platform coverage via pre-built wheels. The GPLv3+ copyleft applies only to modifications; using the binary carries no redistribution obligation. Install friction is medium due to platform-specific wheels, but that is unavoidable for a compiled utility.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a supported platform with a pre-built wheel (Linux x86_64, aarch64, armv7l, ppc64le, s390x, riscv64, i686, or macOS universal2).
- Python >= 3.7.
- Medium install friction due to platform-specific binary wheels.
License · maintenance · safety
GPL-3.0-or-later (copyleft) — Dual-licensed under Apache 2.0 and GPLv3+. The copyleft GPLv3+ component means derivative works or modifications must be released under compatible terms; using the binary as-is carries no obligation, but redistributing modified versions requires GPL compliance.
last release 2026-08-08 (6 days) · last repo commit 2026-08-10 · 12 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,780,922 downloads/mo, #1,264 on PyPI
Alternatives
Verify before relying
pip install patchelf
import patchelf
# patchelf is primarily a command-line tool; Python usage depends on the underlying binary- Whether the package exposes a Python API or is primarily a CLI wrapper around the patchelf binary
- Specific use cases within auditwheel, manylinux, or musllinux workflows that this packaging enables
What it is and what it does
patchelf is a packaging of the upstream NixOS patchelf utility, distributed via PyPI for easy installation. It modifies ELF executables' dynamic linker and RPATH settings, which is essential for binary wheel portability and compatibility across Linux distributions. The package provides pre-built binaries for multiple architectures and libc variants (glibc, musl), eliminating the need to compile patchelf from source.
This is primarily a command-line tool packaged for Python environments. It has no runtime dependencies and is commonly used in build pipelines for auditwheel, manylinux, and musllinux workflows—scenarios where you need to adjust how compiled binaries locate their dependencies. The package is actively maintained and supports modern Python versions.
Use it for
- Building manylinux or musllinux wheels that need to adjust RPATH in compiled extensions
- Automating binary patching in CI/CD pipelines without requiring system package managers
- Modifying ELF executables' dynamic linker for cross-distribution compatibility
- Dependency for auditwheel or similar tools that repair wheel portability
- Development environments where patchelf must be available as a Python dependency
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need patchelf in a Python environment or build pipeline.
It offers zero runtime dependencies, active maintenance, and broad platform coverage via pre-built wheels. The GPLv3+ copyleft applies only to modifications; using the binary carries no redistribution obligation. Install friction is medium due to platform-specific wheels, but that is unavoidable for a compiled utility.
Install
patchelf on PyPI
Before you install
Medium install friction due to platform-specific binary wheels. Active maintenance with recent releases (6 days since last update). No runtime dependencies simplifies deployment.
Requires a supported platform with a pre-built wheel (Linux x86_64, aarch64, armv7l, ppc64le, s390x, riscv64, i686, or macOS universal2). Python >= 3.7.
License in practice
Dual-licensed under Apache 2.0 and GPLv3+. The copyleft GPLv3+ component means derivative works or modifications must be released under compatible terms; using the binary as-is carries no obligation, but redistributing modified versions requires GPL compliance.
Quickstart
pip install patchelf
import patchelf
# patchelf is primarily a command-line tool; Python usage depends on the underlying binary
Verify before relying
- Whether the package exposes a Python API or is primarily a CLI wrapper around the patchelf binary
- Specific use cases within auditwheel, manylinux, or musllinux workflows that this packaging enables
Package facts
| License | GPL-3.0-or-later copyleft |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,780,922 / month, #1,264 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: POSIX :: LinuxProgramming Language :: CProgramming Language :: C++Programming Language :: PythonTopic :: Software Development :: Build Tools |
Evidence: patchelf-0.19.1.0-py3-none-macosx_10_9_universal2.whl; patchelf-0.19.1.0-py3-none-manylinux1_i686.manylinux_2_5_i686.musllinux_1_1_i686.whl; patchelf-0.19.1.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.musllinux_1_1_x86_64.whl; patchelf-0.19.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.musllinux_1_1_aarch64.whl; patchelf-0.19.1.0-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.musllinux_1_1_armv7l.whl; patchelf-0.19.1.0-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.musllinux_1_1_ppc64le.whl; patchelf-0.19.1.0-py3-none-manylinux2014_s390x.manylinux_2_17_s390x.musllinux_1_1_s390x.whl; patchelf-0.19.1.0-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “modify elf executables”
- patchelfProvides a PyPI-packaged binary of patchelf, a utility for modifying…
- liefLIEF parses, modifies, and abstracts binary executable formats (ELF,…
- pyelftoolspyelftools parses and analyzes ELF binary files and DWARF debugging…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also auditwheel · patchelf-wrapper · change-wheel-version · repairwheel · pyelftools · pyvips-binary · cle · lief · s5cmd · cibuildwheel