NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #1847 most downloaded on PyPI
The PEX packaging toolchain.
Latest stable
2.107.1
Last release 16 days ago
06 Nov 2026
Ships on a steady schedule
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
522 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
This release fixes --venv mode PEX venv script shebangs for some scenarios using Python <=3.7 interpreters.
This release fixes --venv mode PEX venv script shebangs for some
scenarios using Python <=3.7 interpreters.
This release brings support for the latest Pip release with --pip-version 23.1 or by using new support for pinning to the latest version of Pip suppor
This release brings support for the latest Pip release with
--pip-version 23.1 or by using new support for pinning to the latest
version of Pip supported by Pex with --pip-version latest.
--pip-version latest. (#2116)Your coding agent can read these notes before it upgrades. Set up the MCP server →
This release fixes some inconsistencies in Pex JSON output across the Python 2/3 boundary and in handling of venv collisions when using the venv Pex t
This release fixes some inconsistencies in Pex JSON output across the Python 2/3 boundary and in handling of venv collisions when using the venv Pex tool.
--pip overrides via PEX deps. (#2107)This release fixes a regression locking certain complex cases of direct and transitive requirement interactions as exemplified in #2098.
This release fixes a regression locking certain complex cases of direct and transitive requirement interactions as exemplified in #2098.
This release fixes a bug downloading a VCS requirement from a lock when the ambient Python interpreter used to run Pex does not meet the Requires-Pyth
This release fixes a bug downloading a VCS requirement from a lock when
the ambient Python interpreter used to run Pex does not meet the
Requires-Python constraint of the VCS requirement.
This release fixes a regression introduced in Pex 2.1.120 that caused --no-venv-site-packages-copies (the default when using --venv) to be ignored for
This release fixes a regression introduced in Pex 2.1.120 that caused
--no-venv-site-packages-copies (the default when using --venv) to
be ignored for both zipapp PEXes (the default) and --layout packed
PEXes.
This release fixes --lock resolve sub-setting for local project requirements.
This release fixes --lock resolve sub-setting for local project
requirements.
This release fixes a long-standing (> 4 years old!) concurrency bug when building the same sdist for the 1st time and racing another Pex process doing
This release fixes a long-standing (> 4 years old!) concurrency bug when building the same sdist for the 1st time and racing another Pex process doing the same sdist build.
This release makes --platform and --complete-platform resolves and locks as permissive as possible. If such a resolve or lock only has an sdist availa
This release makes --platform and --complete-platform resolves and
locks as permissive as possible. If such a resolve or lock only has an
sdist available for a certain project, that sdist will now be used if it
builds to a wheel compatible with the specified foreign platform(s).
This release adds support for specifying --non-hermetic-venv-scripts when building a --venv PEX. This can be useful when integrating with frameworks t
This release adds support for specifying --non-hermetic-venv-scripts
when building a --venv PEX. This can be useful when integrating with
frameworks that do setup via PYTHONPATH manipulation.
Support for Pip 23.0.1 and setuptools 67.4.0 is added via
--pip-version 23.0.1.
Additionally, more work towards hardening Pex against rare concurrency issues in its atomic directory handling is included.
--non-hermetic-venv-scripts. (#2068)This release fixes a few pex3 lock create bugs.
This release fixes a few pex3 lock create bugs.
There was a regression introduced in Pex 2.1.122 where projects that
used a PEP-518 [build-system] requires but specified no corresponding
build-backend would fail to lock.
There were also two long-standing issues handling more exotic direct
reference URL requirements. Source archives with names not following the
standard Python sdist naming scheme of
<project name>-<version>.{zip,tar.gz} would cause a lock error. An
important class of these is provided by GitHub's magic source archive
download URLs. Also, although local projects addressed with Pip
proprietary support for pure local path requirements would lock, the
same local projects addressed via
<project name> @ file://<local project path> would also cause a lock
error. Both of these cases are now fixed and can be locked successfully.
When locking with an --interpreter-constraint, any resolve traversing
wheels using the pypyXY or cpythonXY python tags would cause the
lock to error. Wheels with this form of python tag are now handled
correctly.
[build-system] with no build-backend. (#2064)This release fixes posix file locks used by Pex internally and enhances lock creation to support locking sdist-only C extension projects that do not b
This release fixes posix file locks used by Pex internally and enhances
lock creation to support locking sdist-only C extension projects that do
not build on the current platform. Pex is also updated to support
--pip-version 22.3.1 and --pip-version 23.0, bringing it up to date
with the latest Pip's available.
prepare-metadata-for-build-wheel. (#2053)execute_parallel "leaking" a thread. (#2052)This release fixes two bugs brought to light trying to interoperate with Poetry projects.
This release fixes two bugs brought to light trying to interoperate with Poetry projects.
file:// URL deps in distributions. (#2041)This release completes the --complete-platform fix started in Pex 2.1.116 by #1991. That fix did not work in all cases but now does.
This release completes the --complete-platform fix started in Pex
2.1.116 by #1991. That fix did not work in all cases but now does.
PEXes run in interpreter mode now support command history when the
underlying interpreter being used to run the PEX does; use the
PEX_INTERPRETER_HISTORY bool env var to turn this on.
Additionally, PEXes built with the combination
--layout loose --venv --no-venv-site-packages-copies are fixed to be
robust to moves of the source loose PEX directory.
--venv PEXes to be robust to moves. (#2033)--complete-platform with
--resolve-local-platforms (#2031)This release brings two new features. The venv pex tool now just warns when using --compile and there is a *.pyc compile error instead of failing to c
This release brings two new features. The venv pex tool now just warns
when using --compile and there is a *.pyc compile error instead of
failing to create the venv. Also, a new PEX_DISABLE_VARIABLES env var
knob is added to turn off reading all PEX_* env vars from the
environment.
PEX_TOOLS=1 (#2002)PEX_DISABLE_VARIABLES to lock down a PEX run. (#2014)This is a very tardy hotfix release for a regression introduced in Pex 2.1.91 by #1785 that replaced sys.argv[0] with its fully resolved path. This pr
This is a very tardy hotfix release for a regression introduced in Pex
2.1.91 by #1785 that replaced sys.argv[0] with its fully resolved
path. This prevented introspecting the actual file path used to launch
the PEX which broke BusyBox-alike use cases.
There is also a new --non-hermetic-scripts option accepted by the
venv tool to allow running console scripts with PYTHONPATH
adjustments to the sys.path.
sys.argv[0]. (#2007)--non-hermetic-scripts option to venv tool. (#2010)This release fixes a bug introduced in Pex 2.1.109 where the released Pex PEX could not be executed by PyPy interpreters. More generally, any PEX crea
This release fixes a bug introduced in Pex 2.1.109 where the released
Pex PEX could not be executed by PyPy interpreters. More generally, any
PEX created with interpreter constraints that did not specify the Python
implementation, e.g.: ==3.8.*, were interpreted as being CPython
specific, i.e.: CPython==3.8.*. This is now fixed, but if the
intention of a constraint like ==3.8.* was in fact to restrict to
CPython only, interpreter constraints need to say so now and use
CPython==3.8.* explicitly.
This release fixes a bug in --resolve-local-platforms when --complete-platform was used.
This release fixes a bug in --resolve-local-platforms when
--complete-platform was used.
--complete-platforms match when
--resolve-local-platforms (#1991)This release brings some attention to the pex3 lock export subcommand to make it more useful when interoperating with pip-tools.
This release brings some attention to the pex3 lock export subcommand
to make it more useful when interoperating with pip-tools.
This release brings two fixes for --venv mode PEXes.
This release brings two fixes for --venv mode PEXes.
"" to head of sys.path if a venv PEX runs in
interpreter mode (#1984)This is a hotfix release that fixes errors installing wheels when there is high parallelism in execution of Pex processes. These issues were a regress
This is a hotfix release that fixes errors installing wheels when there is high parallelism in execution of Pex processes. These issues were a regression introduced by #1961 included in the 2.1.112 release.
This release brings support for the latest Pip release and includes some internal changes to help debug intermittent issues some users are seeing that
This release brings support for the latest Pip release and includes some internal changes to help debug intermittent issues some users are seeing that implicate what may be file locking related bugs.
--pip-version 22.3. (#1953)This release fixes resolving requirements from a lock using arbitrary equality (===).
This release fixes resolving requirements from a lock using arbitrary
equality (===).
In addition, you can now "inject" runtime environment variables and arguments into PEX files such that, when run, the PEX runtime ensures those environment variables and command line arguments are passed to the PEXed application. See PEX Recipes for more information.
This release fixes Pex runtime sys.path scrubbing for cases where Pex is not the main entry point. An important example of this is in Lambdex where th
This release fixes Pex runtime sys.path scrubbing for cases where Pex
is not the main entry point. An important example of this is in Lambdex
where the AWS Lambda Python runtime packages (boto3 and botocore)
are leaked into the PEX runtime sys.path.
sys.path scrubbing. (#1946)This release brings musllinux wheel support and a fix for a regression introduced in Pex 2.1.105 by #1902 that caused PEX_PATH= (an exported PEX_PATH
This release brings musllinux wheel support and a fix for a regression
introduced in Pex 2.1.105 by #1902 that caused PEX_PATH= (an exported
PEX_PATH with an empty string value) to raise an error in almost all
use cases.
PEX_PATH= as . like other PATHS. (#1938)This release fixes a latent PEX boot performance bug triggered by requirements with large extras sets.
This release fixes a latent PEX boot performance bug triggered by requirements with large extras sets.
This release fixes an issue handling credentials in git+ssh VCS urls when creating locks.
This release fixes an issue handling credentials in git+ssh VCS urls when creating locks.
This release fixes a long-standing bug in handling direct reference requirements with a local version component.
This release fixes a long-standing bug in handling direct reference requirements with a local version component.
This is a fix release which addresses issues related to build time work_dir creation, virtualenv, and sh_boot support.
This is a fix release which addresses issues related to build time work_dir creation, virtualenv, and sh_boot support.
In the unlikely event of a UUID collision in atomic workdir creation,
pex could overwrite an existing directory and cause a corrupt state.
When building a shell bootable --sh-boot pex the --runtime-pex-root
was not always respected based on the condition of the build
environment, and the value of the PEX_ROOT.
This release brings a long-awaited upgrade of the Pip Pex uses, but behind a --pip-version 22.2.2 flag you must opt in to. Pex will then use that vers
This release brings a long-awaited upgrade of the Pip Pex uses, but
behind a --pip-version 22.2.2 flag you must opt in to. Pex will then
use that version of Pip if it can (your Pex operations target Python
>=3.7) and warn and fall back to the older vendored Pip (20.3.4) if it
can't. To turn the need to fall back to older Pip from a warning into a
hard error you can also specify --no-allow-pip-version-fallback.
The pex3 lock update command now gains the ability to update just the
index and find links repos the lock's artifacts originate from by using
a combination of --no-pypi, --index & --find-links along with
--pin to ensure the project versions stay pinned as they are in the
lockfile and just the repos they are downloaded from is altered. Consult
the CLI --help for --fingerprint-mismatch {ignore,warn,error} to
gain more control over repo migration behavior.
There are several bug fixes as well dealing with somewhat esoteric
corner cases involving changing a PEX --layout from one form to
another and building artifacts using certain interpreters on macOS 11.0
(aka: 10.16).
--output always overwrites destination. (#1883)This release fixes things such that pex lockfiles can be created and updated using the Pex PEX when local projects are involved.
This release fixes things such that pex lockfiles can be created and updated using the Pex PEX when local projects are involved.
pex3 lock ... when run from the Pex PEX. (#1874)This is a hotfix release that fixes a further corner missed by #1863 in the Pex 2.1.101 release whereby Pex would fail to install platform-specific pa
This is a hotfix release that fixes a further corner missed by #1863 in the Pex 2.1.101 release whereby Pex would fail to install platform-specific packages on Red Hat based OSes.
In addition, an old but only newly discovered bug in
--inherit-path={prefer,fallback} handling is fixed. Previously only
using PEX_INHERIT_PATH={prefer,fallback} at runtime worked properly.
In the process of fixing the old --inherit-path={prefer,fallback} bug,
also fix another old bug handling modern virtualenv venvs under Python
2.7 during zipapp execution mode PEX boots.
--inhert-path handling. (#1871)virtualenv>=20.0.0 + python 2.7 (#992)This release fixes a corner-case revealed by python-certifi-win32 1.6.1 that was not previously handled when installing certain distributions.
This release fixes a corner-case revealed by python-certifi-win32 1.6.1 that was not previously handled when installing certain distributions.
site-packages detection robust. (#1863)This release fixes a hole in the lock creation --target-system feature added in #1823 in Pex 2.1.95.
This release fixes a hole in the lock creation --target-system feature
added in #1823 in Pex 2.1.95.
--target-system handling. (#1858)This release fixes a concurrency bug in the pex --lock ... artifact downloading.
This release fixes a concurrency bug in the pex --lock ... artifact
downloading.
pex --lock ... concurrent download errors. (#1854)This releases fixes regressions in foreign --platform handling and artifact downloading introduced by #1787 in Pex 2.1.91 and #1811 in 2.1.93.
This releases fixes regressions in foreign --platform handling and
artifact downloading introduced by #1787 in Pex 2.1.91 and #1811 in
2.1.93.
In addition, PEXes can now be used as sys.path entries. Once on the
sys.path, via PYTHONPATH or other means, the code in the PEX can be
made importable by first importing __pex__ either as its own
stand-alone import statement; e.g.: import __pex__; import psutil or
as a prefix of the code to import from the PEX; e.g.:
from __pex__ import psutil.
--platform. (#1846)This release patches a hole left by #1828 in the Pex 2.1.95 release whereby, although you could run a PEX under a too-long PEX_ROOT you could not buil
This release patches a hole left by #1828 in the Pex 2.1.95 release whereby, although you could run a PEX under a too-long PEX_ROOT you could not build a PEX under a tool-long PEX_ROOT.
--venvs. (#1843)This is a hotfix release that fixes --venv mode PEX_EXTRA_SYS_PATH propagation introduced in Pex 2.1.95 to only apply to sys.executable and not other
This is a hotfix release that fixes --venv mode PEX_EXTRA_SYS_PATH
propagation introduced in Pex 2.1.95 to only apply to sys.executable
and not other Pythons.
--venv PEX PEX_EXTRA_SYS_PATH propagation. (#1837)This release brings two new pex3 lock features for --style universal locks.
This release brings two new pex3 lock features for --style universal
locks.
By default, universal locks are created to target all operating systems.
This can cause problems when you only target a subset of operating
systems and a lock transitive dependency that is conditional on an OS
you do not target is not lockable. The new
--target-system {linux,mac,windows} option allows you to restrict the
set of targeted OSes to work around this sort of issue. Since PEX files
currently only support running on Linux and Mac, specifying
--target-system linux --target-system mac is a safe way to
pre-emptively avoid these sorts of locking issues when creating a
universal lock.
Previously you could not specify the --platforms or
--complete-platforms you would be using later to build PEXes with when
creating a universal lock. You now can, and Pex will verify the
universal lock can support all the specified platforms.
As is usual there are also several bug fixes including properly
propagating PEX_EXTRA_SYS_PATH additions to forked Python processes,
fixing pex3 lock export to only attempt to export for the selected
target and avoiding too long shebang errors for --venv mode PEXes in a
robust way.
PEX_EXTRA_SYS_PATH propagation. (#1832)pex3 lock export: re-use --lock resolver. (#1831)--venv shebangs. (#1828)This is a hotfix release that fixes a regression introduced in Pex 2.1.93 downloading certain sdists when using pex --lock ....
This is a hotfix release that fixes a regression introduced in Pex
2.1.93 downloading certain sdists when using pex --lock ....
pex --lock ... handling of sdists. (#1818)This release brings several new features in addition to bug fixes.
This release brings several new features in addition to bug fixes.
When creating a PEX the entry point can now be any local python script
by passing --exe path/to/python-script.
The pex3 lock update command now supports a -dry-dun check mode that
exits non-zero to indicate that a lock needs updating and the
-p / --project targeted update arguments can now be new projects to
attempt to add to the lock.
On the bug fix front, traditional zipapp mode PEX files now properly
scrub sys.displayhook and sys.excepthook and their teardown sequence
has now been simplified fixing logging to stderr late in teardown.
Finally, pex3 lock create now logs when requirement resolution is
taking a long time to provide some sense of progress and suggest generic
remedies and pex --lock now properly handles authentication.
pex3 lock update --dry-run check mode. (#1799)platform_tag. (#1800)PEX teardown / leave stderr in tact. (#1813)This release adds support for locking local projects.
This release adds support for locking local projects.
This release fixes --sh-boot mode PEXes to have an argv0 and exported PEX environment variable consistent with standard Python boot PEXes; namely the
This release fixes --sh-boot mode PEXes to have an argv0 and exported
PEX environment variable consistent with standard Python boot PEXes;
namely the absolute path of the originally invoked PEX.
--sh-boot argv0. (#1785)This release fixes Pex handling of sdists to be atomic and also fixes lock files to be emitted ending with a newline. In addition, many typos in Pex d
This release fixes Pex handling of sdists to be atomic and also fixes lock files to be emitted ending with a newline. In addition, many typos in Pex documentation were fixed in a contribution by Kian-Meng Ang.
This release brings official support for CPython 3.11 and PyPy 3.9 as well as long needed robust runtime interpreter selection.
This release brings official support for CPython 3.11 and PyPy 3.9 as well as long needed robust runtime interpreter selection.
This release is a hotfix for 2.1.86 that handles unparseable ~/.netrc files gracefully.
This release is a hotfix for 2.1.86 that handles unparseable ~/.netrc
files gracefully.
~/.netrc can't be loaded. (#1763)This release fixes pex3 lock create to handle relative --tmpdir.
This release fixes pex3 lock create to handle relative --tmpdir.
This release fixes an oversight in lock file use against secured custom indexes and find links repos. Previously credentials were passed during the lo
This release fixes an oversight in lock file use against secured custom
indexes and find links repos. Previously credentials were passed during
the lock creation process via either ~/.netrc or via embedded
credentials in the custom indexes and find links URLs Pex was configured
with. But, at lock use time, these credentials were not used. Now
~/.netrc entries are always used and embedded credentials passed via
custom URLS at lock creation time can be passed in the same manner at
lock use time.
This PyCon US 2022 release brings full support for Python interpreter emulation when a PEX is run in interpreter mode (without an entry point or else
This PyCon US 2022 release brings full support for Python interpreter
emulation when a PEX is run in interpreter mode (without an entry point
or else when forced via PEX_INTERPRETER=1).
A special thank you to Loren Arthur for contributing the fix in the Pantsbuild sprint at PyCon.
This release fixes a bug creating a PEX from a --lock when pre-release versions are involved.
This release fixes a bug creating a PEX from a --lock when pre-release
versions are involved.
--lock handling of pre-release versions. (#1742)This releases fixes a bug creating --style universal locks with --interpreter-constraint configured when the ambient interpreter does not match the co
This releases fixes a bug creating --style universal locks with
--interpreter-constraint configured when the ambient interpreter does
not match the constraints and the resolved lock includes sdist primary
artifacts.
This is a hotfix release for a regression in prerelease version handling introduced in the 2.1.81 release by #1727.
This is a hotfix release for a regression in prerelease version handling introduced in the 2.1.81 release by #1727.
This release brings a fix to Pex resolve checking for distributions built by setuptools whose Requires-Dist metadata does not match a distibutions pro
This release brings a fix to Pex resolve checking for distributions
built by setuptools whose Requires-Dist metadata does not match a
distibutions project name exactly (i.e.: no PEP-503 [._-]
normalization was performed).
This release brings another fix for pathologically slow cases of lock creation as well as a new --sh-boot feature for creating PEXes that boot via /bi
This release brings another fix for pathologically slow cases of lock
creation as well as a new --sh-boot feature for creating PEXes that
boot via /bin/sh for more resilience across systems with differing
Python installations as well as offering lower boot latency.
/bin/sh with --sh-boot. (#1721)This release fixes --lock resolving for certain cases where extras are involved as well as introducing support for generating and consuming portable -
This release fixes --lock resolving for certain cases where extras are
involved as well as introducing support for generating and consuming
portable --find-links locks using -path-mapping.
--lock resolver extras handling. (#1719)This release fixes missing artifacts in non-strict locks.
This release fixes missing artifacts in non-strict locks.
This release fixes pathologically slow cases of lock creation as well as introducing support for --no-compression to allow picking the time-space trad
This release fixes pathologically slow cases of lock creation as well as
introducing support for --no-compression to allow picking the
time-space tradeoff you want for your PEX zips.
This release finalizes spurious deadlock handling in --lock resolves worked around in #1694 in Pex 2.1.75.
This release finalizes spurious deadlock handling in --lock resolves
worked around in #1694 in Pex 2.1.75.
This release fixes a deadlock when building PEXes in parallel via the new --lock flag.
This release fixes a deadlock when building PEXes in parallel via the
new --lock flag.
This release fixes multiplatform --lock resolves for sdists that are built to multiple platform specific wheels, and it also introduces support for VC
This release fixes multiplatform --lock resolves for sdists that are
built to multiple platform specific wheels, and it also introduces
support for VCS requirements in locks.
--lock for multiplatform via sdists. (#1689)One column per quarter.