skillfed

pex

The PEX packaging toolchain.

pex v2.100.4 6.6M downloads/30d#1,885 on PyPI4,220
Permissive license Apache-2.0 Active released

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 on this page — 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

pex on PyPI

pip

pip install pex

uv

uv add pex

poetry

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 the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.16,>=2.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 1 days since the last release
Last repo commit
First released
Downloads 6,582,503/month — #1,885 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pex-2.100.4-py2.py35.py36.py37.py38.py39.py310.py311-none-any.whl; pex-2.100.4-py3.py312-none-any.whl

Keywords: package, executable, virtualenv, lock, freeze

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Build ToolsTopic :: System :: Archiving :: PackagingTopic :: System :: Software DistributionTopic :: Utilities

Tags

python executable packagingpex files build toolportable python environmentspython application deploymentstandalone python binariesdependency bundling toolcross-platform python distribution
packagingdeploymentcli-tools

More Utilities packages