--- id: pex version: "2.100.4" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pex — The PEX packaging toolchain. License: permissive · Maintenance: active · Downloads: 6.6M/mo ## What it is and what it does Pex is a command-line tool and library for building .pex files—self-contained, executable Python environments that function as portable binaries. Rather than shipping a virtualenv or requiring installation on the target system, pex bundles dependencies into a single executable file that runs without additional setup. The tool supports specifying dependencies, entry points, and platform-specific Python distributions, enabling cross-platform portability. Pex is used to freeze dependencies into portable executables for application deployment, create standalone CLI tools, or integrate into build systems like Pants and Buck. It eliminates the need to manage virtualenvs on target machines and provides a simple distribution mechanism for Python applications. Use it for: - Deploy a Python web service as a single executable file without requiring virtualenv or pip on the target server. - Create a standalone CLI tool that bundles all dependencies and runs on Linux or macOS systems. - Freeze a development environment into a reproducible .pex file for consistent testing across machines. - Build entry-point-based executables as self-contained binaries for distribution. - Run ephemeral scripts with specific dependencies without modifying the host environment. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pex generates standalone, executable Python environments (.pex files) that bundle dependencies into portable binaries for deployment without virtualenv setup. Yes. Pex is actively maintained with a release 1 day ago, has zero known vulnerabilities, and low install friction. It solves a real deployment problem by turning projects into portable, dependency-bundled executables. Well-suited for teams shipping applications or tools that need to run on multiple systems. The Apache-2.0 permissive license poses no restrictions. ## Install pip install pex uv add pex poetry add pex ## Installing pex Before you install: Low install friction with no runtime dependencies. Active maintenance with a release 1 day ago and 4220 repository stars. Supports modern versions including PyPy. License in practice: Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions. Quickstart: $ pip install pex $ pex requests flask -o myapp.pex $ ./myapp.pex Verify before relying: - Whether .pex files built on one OS reliably execute on different OS targets without rebuilding - Performance overhead of .pex startup compared to traditional virtualenv execution - Compatibility guarantees across the full range of supported Python versions (2.7 through 3.15) ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python executable packaging, pex files build tool, portable python environments, python application deployment, standalone python binaries, dependency bundling tool, cross-platform python distribution, packaging, deployment, cli-tools [View on SkillFed](https://skillfed.io/packages/pex) · [View on PyPI](https://pypi.org/project/pex/)