NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1992 most downloaded on PyPI
The PEX packaging toolchain.
Last release 7 days ago
18 Sep 2026
Ships fairly regularly
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
13 years old
508 releases · first in 2014
This release adds the boolean option --venv-site-packages-copies to control whether --venv execution mode PEXes create their venv with copies (hardlin
This release adds the boolean option --venv-site-packages-copies to
control whether --venv execution mode PEXes create their venv with
copies (hardlinks when possible) or symlinks. It also fixes a bug that
prevented Python 3.10 interpreters from being discovered when
--interpreter-constraint was used.
--venv site-packages symlinking. (#1543)This release fixes a bug handling relative --cert paths.
This release fixes a bug handling relative --cert paths.
One column per quarter.
This release brings a few performance improvements and a new venv pex-tools --remove feature that is useful for creating optimized container images fr
This release brings a few performance improvements and a new
venv pex-tools --remove feature that is useful for
creating optimized container images from PEX files.
--venv mode. (#1532)--remove {pex,all} option. (#1525)* Fix wheel install hermeticity.
This release brings official support for Python 3.10 as well as fixing doc generation and fixing help for pex-tools / PEX_TOOLS=1 ./my.pex pex tools i
This release brings official support for Python 3.10 as well as fixing
https://docs.pex-tool.org doc generation and fixing help for
pex-tools / PEX_TOOLS=1 ./my.pex pex tools invocations that have too
few arguments.
This release fixes a bug in --venv creation that could mask deeper errors populating PEX venvs.
This release fixes a bug in --venv creation that could mask deeper
errors populating PEX venvs.
--venv mode short link creation. (#1505)This release fixes a bug identifying certain interpreters on macOS Monterey.
This release fixes a bug identifying certain interpreters on macOS Monterey.
Additionally, Pex has two new features:
PEX environment variable inside running PEXes
to allow application code to both detect it's running from a PEX
and determine where that PEX is located.--prompt option in the venv tool to allow for
customization of the venv activation prompt.PEX env var. (#1495)This release makes a wider array of distributions resolvable for --platform resolves by inferring the platform_machine environment marker correspondin
This release makes a wider array of distributions resolvable for
--platform resolves by inferring the platform_machine environment
marker corresponding to the requested --platform.
platform_machine in --platform resolve. (#1489)This release fixes both PEX creation and --venv creation to handle distributions that contain scripts with non-ascii characters in them when running i
This release fixes both PEX creation and --venv creation to handle
distributions that contain scripts with non-ascii characters in them
when running in environments with a default encoding that does not
contain those characters under PyPy3, Python 3.5 and Python 3.6.
This is another hotfix of the 2.1.48 release's --layout feature that fixes identification of --layout zipapp PEXes that have had their execute mode bi
This is another hotfix of the 2.1.48 release's --layout feature that
fixes identification of --layout zipapp PEXes that have had their
execute mode bit turned off. A notable example is the Pex PEX when
downloaded from https://github.com/pex-tool/pex/releases.
This is a hotfix release that fixes the new --layout {zipapp,packed} modes for PEX files with no user code & just third party dependencies when execut
This is a hotfix release that fixes the new --layout {zipapp,packed}
modes for PEX files with no user code & just third party dependencies
when executed against a $PEX_ROOT where similar PEXes built with the
old --not-zip-safe option were run in the past.
The --unzip / PEX_UNZIP toggles for PEX runtime execution are now the default and deprecated as explicit options as a result. You can still select the…
This releases introduces the --layout flag for selecting amongst the
traditional zipapp layout as a single PEX zip file and two new directory
tree based formats that may be useful for more sophisticated deployment
scenarios.
The --unzip / PEX_UNZIP toggles for PEX runtime execution are now
the default and deprecated as explicit options as a result. You can
still select the venv runtime execution mode via the --venv /
PEX_VENV toggles though.
--layout. (#1438)This is a hotfix release that fixes a regression for --venv mode PEXes introduced in #1410. These PEXes were not creating new venvs when the PEX was u
This is a hotfix release that fixes a regression for --venv mode PEXes
introduced in #1410. These PEXes were not creating new venvs when the
PEX was unconstrained and executed with any other interpreter than the
interpreter the venv was first created with.
--venv mode venv dir hash. (#1428)This release improves PEX file build reproducibility and requirement parsing of environment markers in Pip's proprietary URL format.
This release improves PEX file build reproducibility and requirement parsing of environment markers in Pip's proprietary URL format.
Also, the -c / --script / --console-script argument now supports
non-Python distribution scripts.
Finally, new contributor @blag improved the README.
setup(scripts=...)
from setup.py. (#1381)This is a hotfix release that fixes the --bdist-all handling in the bdist_pex distutils command that regressed in 2.1.43 to only create a bdist for th
This is a hotfix release that fixes the --bdist-all handling in the
bdist_pex distutils command that regressed in 2.1.43 to only create a
bdist for the first discovered entry point.
--bdist-all handling multiple console_scripts (#1396)This is a hotfix release that fixes env var collisions (introduced in the Pex 2.1.43 release by #1367) that could occur when invoking Pex with environ
This is a hotfix release that fixes env var collisions (introduced in
the Pex 2.1.43 release by #1367) that could occur when invoking Pex with
environment variables like PEX_ROOT defined.
Fix dist-info metadata discovery.
--platform resolve handling of env markers. (#1367)--no-manylinux. (#1365)--platform resolves for current interpreter. (#1364)This release brings a bugfix for macOS interpreters when the MACOSX_DEPLOYMENT_TARGET sysconfig variable is numeric as well as a fix that improves Pip
This release brings a bugfix for macOS interpreters when the MACOSX_DEPLOYMENT_TARGET sysconfig variable is numeric as well as a fix that improves Pip execution environment isolation.
This release brings a hotfix from @kaos for interpreter identification on macOS 11.
This release brings a hotfix from @kaos for interpreter identification on macOS 11.
This release brings proper support for pyenv shim interpreter identification as well as a bug fix for venv mode.
This release brings proper support for pyenv shim interpreter identification as well as a bug fix for venv mode.
--strip-pex-env. (#1329)A hotfix that fixes a bug present since 2.1.25 that results in infinite recursion in PEX runtime resolves when handling dependency cycles.
A hotfix that fixes a bug present since 2.1.25 that results in infinite recursion in PEX runtime resolves when handling dependency cycles.
A hotfix that finishes work started in 2.1.37 by #1304 to align Pip based resolve results with --pex-repository based resolve results for requirements
A hotfix that finishes work started in 2.1.37 by #1304 to align Pip
based resolve results with --pex-repository based resolve results for
requirements with '.' in their names as allowed by PEP-503.
Fix Pex isolation to avoid temporary pyc files.
--pex-repository requirement canonicalization. (#1304)pex and pex-tools CLIs with uniform -V / --version
support and default value display in help. (#1301)This release brings a fix for building sdists with certain macOS interpreters when creating a PEX file that would then fail to resolve on PEX startup.
This release brings a fix for building sdists with certain macOS interpreters when creating a PEX file that would then fail to resolve on PEX startup.
--seed verbose. (#1299)This release hardens a few aspects of --venv mode PEXes. An infinite re-exec loop in venv pex scripts is fixed and the activate family of scripts in t
This release hardens a few aspects of --venv mode PEXes.
An infinite re-exec loop in venv pex scripts is fixed and
the activate family of scripts in the venv is fixed.
--venv core scripts. (#1278)Beyond bugfixes for a few important edge cases, this release includes new support for @argfiles on the command line from @jjhelmus. These can be usefu
Beyond bugfixes for a few important edge cases, this release includes new support for @argfiles on the command line from @jjhelmus. These can be useful to overcome command line length limitations. See: https://docs.python.org/3/library/argparse.html#fromfile-prefix-chars.
Support console scripts found in the PEX_PATH.
This is a hotfix release that fixes --venv mode shebangs being too long for some Linux environments.
This is a hotfix release that fixes --venv mode shebangs being too
long for some Linux environments.
--venv mode shebangs. (#1254)This release primarily hardens Pex venvs fixing several bugs.
This release primarily hardens Pex venvs fixing several bugs.
--runtime-pex-root leak in pex bootstrap. (#1244)pex venv script handles entrypoints like PEX.
(#1242)This release fixes another bug in --venv mode when PEX_PATH is exported in the environment.
This release fixes another bug in --venv mode when PEX_PATH is
exported in the environment.
--venv mode to respect PEX_PATH. (#1227)This release fixes bugs in --unzip and --venv mode PEX file execution and upgrades to the last release of Pip to support Python 2.7.
This release fixes bugs in --unzip and --venv mode PEX file
execution and upgrades to the last release of Pip to support Python 2.7.
--venv mode. (#1221)PexInfo.pex_hash calculation more robust. (#1219)This is another hotfix release to fix incorrect resolve post-processing failing otherwise correct resolves.
This is another hotfix release to fix incorrect resolve post-processing failing otherwise correct resolves.
This is another hotfix release to fix a regression in Pex --sources-directory handling of relative paths.
This is another hotfix release to fix a regression in Pex
--sources-directory handling of relative paths.
Chroot.symlink. (#1194)This is a hotfix release that fixes requirement parsing when there is a local file in the CWD with the same name as the project name of a remote requi
This is a hotfix release that fixes requirement parsing when there is a local file in the CWD with the same name as the project name of a remote requirement to be resolved.
This release brings support for a --venv execution mode to complement --unzip and standard unadorned PEX zip file execution modes. The --venv executio
This release brings support for a --venv execution mode to complement
--unzip and standard unadorned PEX zip file execution modes. The
--venv execution mode will first install the PEX file into a virtual
environment under ${PEX_ROOT}/venvs and then re-execute itself from
there. This mode of execution allows you to ship your PEXed application
as a single zipfile that automatically installs itself in a venv and
runs from there to eliminate all PEX startup overhead on subsequent runs
and work like a "normal" application.
There is also support for a new resolution mode when building PEX files
that allows you to use the results of a previous resolve by specifying
it as a -pex-repository to resolve from. If you have many applications
sharing a requirements.txt / constraints.txt, this can drastically speed
up resolves.
pip debug warning. (#1183)-r / --constraints URL to the CLI. (#1163)--venv mode similar to --unzip mode. (#1153)This release upgrades Pip to 20.3.3 + a patch to fix Pex resolves using the pip-legacy-resolver and --constraints. The Pex package is also fixed to in
This release upgrades Pip to 20.3.3 + a patch to fix Pex resolves using
the pip-legacy-resolver and --constraints. The Pex package is also
fixed to install for Python 3.9.1+.
Although this release defaults to the legacy resolver behavior, the next release will deprecate the legacy resolver and support for the legacy resolve…
This release upgrades Pex to the latest Pip which includes support for
the new 2020-resolver (see:
https://pip.pypa.io/en/stable/user_guide/#resolver-changes-2020) as
well as support for macOS BigSur. Although this release defaults to the
legacy resolver behavior, the next release will deprecate the legacy
resolver and support for the legacy resolver will later be removed to
allow continuing Pip upgrades going forward. To switch to the new
resolver, use: --resolver-version pip-2020-resolver.
Finally, the long deprecated exposure of the Pex APIs through _pex has been removed. To use the Pex APIs you must include pex as a dependency in your…
This release fixes a deadlock that could be experienced when building
PEX files in highly concurrent environments in addition to fixing
pex --help-variables output.
A new suite of PEX tools is now available in Pex itself and any PEXes
built with the new --include-tools option. Use
PEX_TOOLS=1 pex --help to find out more about the available tools and
their usage.
Finally, the long deprecated exposure of the Pex APIs through _pex has
been removed. To use the Pex APIs you must include pex as a dependency
in your PEX file.
PythonInterpreter venv support. (#1129)PythonInterpreter binary normalization. (#1125)requires_dists function. (#1122)is_exe helper. (#1123)safe_open for single element relative paths.
(#1118)--help-variables docs. (#1113)Deprecate -R/--resources-directory.
iter_compatible_interpreters with path. (#1110)Requires-Python environment marker mapping. (#1105)InstalledDistribution env markers. (#1104)-R/--resources-directory. (#1103)/dev/null. (#1102)This release improves interpreter discovery to prefer more recent patch versions, e.g. preferring Python 3.6.10 over 3.6.8.
This release improves interpreter discovery to prefer more recent patch versions, e.g. preferring Python 3.6.10 over 3.6.8.
We recently regained access to the docsite, and https://docs.pex-tool.org/ is now up-to-date.
--pex-python when it's the same as the current interpreter.
(#1087)dir_hash vs. bytecode compilation races. (#1080)This release adds the --python-path option, which allows controlling the interpreter search paths when building a PEX.
This release adds the --python-path option, which allows controlling
the interpreter search paths when building a PEX.
The release also removes --use-first-matching-interpreter, which was a
misfeature. If you want to use fewer interpreters when building a PEX,
use more precise values for --interpreter-constraint and/or
--python-path, or use --python or --platform.
--python-path to change interpreter search paths when building
a PEX. (#1077)--use-first-matching-interpreter misfeature. (#1076)--inherit-path handling. (#1072)This release brings official support for Python 3.9 and adds a new --tmpdir option to explicitly control the TMPDIR used by Pex and its subprocesses.
This release brings official support for Python 3.9 and adds a new
--tmpdir option to explicitly control the TMPDIR used by Pex and its
subprocesses. The latter is useful when building PEXes in
space-constrained environments in the face of large distributions.
The release also fixes --cert and --client-cert so that they work
with PEP-518 builds in addition to fixing bytecode compilation races in
highly parallel environments.
--tmpdir option to the Pex CLI. (#1068)sys.executable unless macOS Framework. (#1065)--cert and --client-cert. (#1063)--cert for PEP-518 builds. (#1060)This release fixes a bug in --resolve-local-platforms handling that made it unusable in 2.1.16 (#1043) as well as fixing a long-standing file handle l
This release fixes a bug in --resolve-local-platforms handling that
made it unusable in 2.1.16 (#1043) as well as fixing a long-standing
file handle leak (#1050) and a bug when running under macOS framework
builds of Python (#1009).
--unzip performance regression. (#1056)iter_compatible_interpreters. (#1048)sys.executable being accurate. (#1049)util.py and tracer.pyThis release fixes a bug in sys.path scrubbing / hermeticity (#1025) and a bug in the -D / --sources-directory and -R / --resources-directory options
This release fixes a bug in sys.path scrubbing / hermeticity (#1025)
and a bug in the -D / --sources-directory and
-R / --resources-directory options whereby PEP-420 implicit
(namespace) packages were not respected (#1021).
sys.path manipulations by .pth files. (#1026)A patch release to fix an issue with the --use-first-matching-interpreter flag.
A patch release to fix an issue with the
--use-first-matching-interpreter flag.
--use-first-matching-interpreter at runtime. (#1014)This release adds the --use-first-matching-interpreter flag, which can speed up performance when building a Pex at the expense of being compatible wit
This release adds the --use-first-matching-interpreter flag, which can
speed up performance when building a Pex at the expense of being
compatible with fewer interpreters at runtime.
--use-first-matching-interpreter. (#1008)The focus of this release is better support of the --platform CLI arg. Platforms are now better documented and can optionally be resolved to local int
The focus of this release is better support of the --platform CLI arg.
Platforms are now better documented and can optionally be resolved to
local interpreters when possible via --resolve-local-platforms to
better support creation of multiplatform PEXes.
--platform locally. (#1000)--platform help. (#1002)--platform help. (#1001)A patch release to deploy the PEX_EXTRA_SYS_PATH feature.
A patch release to deploy the PEX_EXTRA_SYS_PATH feature.
A patch release to fix a symlink issue in remote execution environments.
A patch release to fix a symlink issue in remote execution environments.
Fix deprecation warning for rU mode
This release focuses on the resolver API and resolution performance. Pex 2 resolving using Pip is now at least at performance parity with Pex 1 in all studied cases and most often is 5% to 10% faster.
As part of the resolution performance work, Pip networking configuration
is now exposed via Pex CLI options and the NetworkConfiguration API
type / new resolver.resolve API parameter.
With network configuration now wired up, the PEX_HTTP_RETRIES and
PEX_HTTP_TIMEOUT env var support in Pex 1 that was never wired into
Pex 2 is now dropped in favor of passing --retries and --timeout via
the CLI (See: #94)
.can_add() (#973)--local mode for packaging the Pex PEX. (#971)rU mode (#956)This release introduces the ability to copy requirements from an existing PEX into a new one.
This release introduces the ability to copy requirements from an existing PEX into a new one.
This can greatly speed up repeatedly creating a PEX when no requirements have changed. A build tool (such as Pants) can create a "requirements PEX" that contains just a static set of requirements, and build a final PEX on top of that, without having to re-run pip to resolve requirements.
This release brings enhanced performance when using the Pex CLI or API to resolve requirements and improved performance for many PEXed applications wh
This release brings enhanced performance when using the Pex CLI or API
to resolve requirements and improved performance for many PEXed
applications when specifying the --unzip option. PEXes built with
--unzip will first unzip themselves into the Pex cache if not unzipped
there already and then re-execute themselves from there. This can
improve startup latency. Pex itself now uses this mode in our PEX
release.
The --cache-dir setting is deprecated in favor of build time control of the cache location with --pex-root and new support for control of the cache's…
This release brings more robust control of the Pex cache (PEX_ROOT).
The --cache-dir setting is deprecated in favor of build
time control of the cache location with --pex-root and
new support for control of the cache's runtime location with
--runtime-pex-root is added. As in the past, the
PEX_ROOT environment variable can still be used to
control the cache's runtime location.
Unlike in the past, the Pex PEX we
release can now also be controlled via the PEX_ROOT environment
variable. Consult the CLI help for --no-strip-pex-envcto find out
more.
PEX_* env stripping and allow turning off. (#932)--runtime-pex-root option. (#780)Requires-Python in
PEXEnvironment. (#923)Don't delete the root __init__.py when devendoring.
Silence pip warnings about Python 2.7.
Pip.spawn_install_wheel overwrite arg. (#907)This release fixes the hermeticity of pip resolver executions when the resolver is called via the Pex API in an environment with PYTHONPATH set.
This release fixes the hermeticity of pip resolver executions when the resolver is called via the Pex API in an environment with PYTHONPATH set.
bdist_pex tests to explicit cmdclass. (#897)This release fixes a performance regression in which pip would re-tokenize --find-links pages unnecessarily. The parsed pages are now cached in a pip
This release fixes a performance regression in which pip would
re-tokenize --find-links pages unnecessarily. The parsed pages are now
cached in a pip patch that has also been submitted upstream.
This release fixes a bug in which interpreter discovery failed when running from a zipped pex.
This release fixes a bug in which interpreter discovery failed when running from a zipped pex.
This release significantly improves performance and correctness of interpreter discovery, particularly when pyenv is involved. It also provides a work
This release significantly improves performance and correctness of interpreter discovery, particularly when pyenv is involved. It also provides a workaround for EPERM issues when hard linking across devices, by falling back to copying. Resolve error checking also now accounts for environment markers.
--index-url option
(#865)tox -epackage to create pex supporting 3.8. (#843)This release restores and improves support for building and running multiplatform pexes. Foreign linux* platform builds now include manylinux2014 comp
This release restores and improves support for building and running
multiplatform pexes. Foreign linux* platform builds now
include manylinux2014 compatible wheels by default and
foreign CPython pexes now resolve abi3 wheels correctly.
In addition, error messages at both build-time and runtime related to
resolution of dependencies are more informative.
Pex 2.1.0 should be considered the first Pex 2-series release that fully replaces and improves upon Pex 1-series functionality.
--ignore-errors. (#828)pkg_resources finders monkey-patching. (#827)Your coding agent can read these notes before it upgrades. Set up the MCP server →