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 today
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 support for Pip 24.1.1.
This release adds support for Pip 24.1.1.
--pip-version 24.1.1. (#2451)There are no changes to Pex code or released artifacts over 2.6.1 or 2.6.2, just a further fix to the GitHub Releases release process which
There are no changes to Pex code or released artifacts over 2.6.1 or 2.6.2, just a further fix to the GitHub Releases release process which #2442 broke and #2444 only partially fixed.
One column per quarter.
> Although 2.6.2 successfully released to [PyPI](
[!NOTE] Although 2.6.2 successfully released to PyPI, it failed to release to GitHub Releases (neither the Pex PEX nor the pex.pdf were published.) You can use Pex 2.6.3 instead which has no Pex code changes over this release.
There are no changes to Pex code or released artifacts over 2.6.1, just a fix to the GitHub Releases release process which #2442 broke.
> Although 2.6.1 successfully released to [PyPI](
[!NOTE] Although 2.6.1 successfully released to PyPI, it failed to release to GitHub Releases (neither the Pex PEX nor the pex.pdf were published.) You can use Pex 2.6.3 instead which has no Pex code changes over this release.
This release improves error messages when attempting to read invalid metadata from distributions such that the problematic distribution is always identified.
This release adds support for PEP-723 script metadata in --exes. For such a script with metadata describing its dependencies or Python version require
This release adds support for PEP-723 script metadata in --exes. For such
a script with metadata describing its dependencies or Python version
requirements, running the script is as simple as
pex --exe <script> -- <script args> and building a PEX encapsulating
it as simple as pex --exe <script> --output <PEX file>.
--exe. (#2436)This release brings support for Python 3.13 and --pip-version 24.1, which is the first Pip version to support it.
This release brings support for Python 3.13 and --pip-version 24.1,
which is the first Pip version to support it.
--pip-version 24.1 and Python 3.13. (#2435)This release fixes pex --only-binary X --lock ... to work with lock files also created with --only-binary X. The known case here is a --style universa
This release fixes pex --only-binary X --lock ... to work with lock
files also created with --only-binary X. The known case here is a
--style universal lock created with --only-binary X to achieve a
partially wheel-only universal lock.
pex --only-binary X --lock .... (#2433)This release brings new support for preserving arguments passed to the Python interpreter (like -u or -W ignore) either via running a PEX via Python f
This release brings new support for preserving arguments passed to the
Python interpreter (like -u or -W ignore) either via running a PEX
via Python from the command line like python -u my.pex or via a
shebang with embedded Python arguments like #!/usr/bin/python -u.
In addition, PEXes can now be built with --inject-python-args similar
to the existing --inject-args but sealing in arguments to pass to
Python instead. When both explicitly passed Python interpreter arguments
and injected Python interpreter arguments are specified, the injected
arguments appear first on the synthesized command line and the
explicitly passed arguments appear last so that the explicit arguments
can trump (which is how Python handles this).
Several bugs existing in the --exclude implementation since its
introduction are now fixed and the feature is greatly improved to act on
excludes eagerly, never traversing them in the resolve process; thus
avoiding downloads associated with them as well as potentially failing
metadata extraction & wheel builds for ill-behaved sdists.
Finally, a bug was fixed in pex3 lock export for lock files containing
either locked VCS requirements or locked local project directories.
Previously, these were exported with a <project name>==<version>
requirement, which lost fidelity with the input requirement. Now they
are exported with their original requirement form. Further, since the
--hash of these styles of locked requirement are unuseable outside
Pex, a new --format option of pip-no-hashes is introduced for the
adventurous.
--exclude. (#2409)pex3 lock export handling of exotic reqs. (#2423)This release fixes pex3 lock create support for --pip-versions 23.3.1 and newer. Previously, when locking using indexes that serve artifacts via re-di
This release fixes pex3 lock create support for --pip-versions
23.3.1 and newer. Previously, when locking using indexes that serve
artifacts via re-directs, the resulting lock file would contain the
final re-directed URL instead of the originating index artifact URL.
This could lead to issues when the indexes re-direction scheme changed
or else if authentication parameters in the original index URL were
stripped in the Pip logs.
pip>=23.3. (#2421)This release fixes a regression for users of gevent monkey patching. The fix in #2356 released in Pex 2.1.163 lead to these users receiving spurious w
This release fixes a regression for users of gevent monkey patching. The fix in #2356 released in Pex 2.1.163 lead to these users receiving spurious warnings from the gevent monkey patch system about ssl being patched too late.
pex.fetcher. (#2417)This release fixes Pex to respect lock file interpreter constraints and target systems when downloading artifacts.
This release fixes Pex to respect lock file interpreter constraints and target systems when downloading artifacts.
This release introduces pex3 lock sync as a higher-level tool that can be used to create and maintain a lock as opposed to using a combination of pex3
This release introduces pex3 lock sync as a higher-level tool that
can be used to create and maintain a lock as opposed to using a
combination of pex3 lock create and pex3 lock update. When there is
no existing lock file, pex3 lock sync --lock lock.json ... is
equivalent to pex3 lock create --output lock.json ..., it creates a
new lock. On subsequent uses however,
pex3 lock sync --lock lock.json ... updates the lock file minimally to
meet any changed requirements or other changed lock settings.
This release also fixes pex --no-build --lock ... to work with lock
files also created with --no-build. The known case here is a
--style universal lock created with --no-build to achieve a
wheel-only universal lock.
This release includes a fix to clarify the conditions under which
--requierements-pex can be used to combine the third party
dependencies from a pre-built PEX into a new PEX; namely, that the PEXes
must use the same value for the --pre-install-wheels option.
Finally, this release fixes pex3 venv to handle venvs created by
Virtualenv on systems that distinguish purelib and platlib
site-packages directories. Red Hat distributions are a notable example
of this.
--requirements-pex. (#2392)pex --no-build --lock .... (#2390)This release fixes pex3 lock create to handle .tar.bz2 and .tgz sdists in addition to the officially sanctioned .tar.gz and (less officially so) .zip
This release fixes pex3 lock create to handle .tar.bz2 and .tgz
sdists in addition to the officially sanctioned .tar.gz and (less
officially so) .zip sdists.
.tar.bz2 & .tgz sdists when locking. (#2380)This release trims down the size of the Pex wheel on PyPI and the released Pex PEX by about 20KB by consolidating image resources.
This release trims down the size of the Pex wheel on PyPI and the released Pex PEX by about 20KB by consolidating image resources.
This release also fixes the release process to remove a window of time when several links would be dead on at https://docs.pex-tool.org that pointed to release artifacts that were not yet fully deployed.
This release adds tools to interact with Pex's new embedded offline documentation. You can browse those docs with pex --docs or, more flexibly, with p
This release adds tools to interact with Pex's new embedded offline
documentation. You can browse those docs with pex --docs or, more
flexibly, with pex3 docs. See pex3 docs --help for all the options
available.
This release also returns to SemVer versioning practices. Simply, you can expect 3 things from Pex version numbers:
You can expect the minor version to get pretty big going forward!
pex --docs and several pex3 docs options. (#2365)This release moves Pex documentation from https://pex.readthedocs.io to https://docs.pex-tool.org. While legacy versioned docs will remain available a
This release moves Pex documentation from https://pex.readthedocs.io to
https://docs.pex-tool.org. While legacy versioned docs will remain
available at RTD in perpetuity, going forward only the latest Pex
release docs will be available online at the https://docs.pex-tool.org
site. If you want to see the Pex docs for the version you are currently
using, Pex now supports the pex3 docs command which will serve the
docs for your Pex version locally, offline, but with full functionality,
including search.
This release fixes Pex to work in certain OS / SSL environments where it did not previously. In particular, under certain Fedora distributions using c
This release fixes Pex to work in certain OS / SSL environments where it did not previously. In particular, under certain Fedora distributions using certain Python Build Standalone interpreters.
This release adds support for --pip-version 24.0 as well as fixing a bug in URL encoding for artifacts in lock files. Notably, torch's use of local ve
This release adds support for --pip-version 24.0 as well as fixing a
bug in URL encoding for artifacts in lock files. Notably, torch's use of
local version identifiers (+cpu) combined with their find links page
at https://download.pytorch.org/whl/torch_stable.html would lead to
pex3 lock create errors.
This release adds support for --only-wheel and --only-build to allow finer control over which distribution artifacts are resolved when building a PEX
This release adds support for --only-wheel <project name> and
--only-build <project name> to allow finer control over which
distribution artifacts are resolved when building a PEX or creating or
updating a lock file. These options correspond to Pip's --only-binary
and --no-binary options with project name arguments.
--{no,only}-binary. (#2346)This release adds the ability for pex3 lock update to replace requirements in a lock or delete them from the lock using -R / --replace-project and -d
This release adds the ability for pex3 lock update to replace
requirements in a lock or delete them from the lock using
-R / --replace-project and -d / --delete-project, respectively.
This release brings a fix for leaks of Pex's vendored attrs onto the sys.path of PEXes during boot in common usage scenarios.
This release brings a fix for leaks of Pex's vendored attrs onto the
sys.path of PEXes during boot in common usage scenarios.
sys.path leak. (#2328)This release adds support for tab completion to all PEX repls running under Pythons with the readline module available. This tab completion support is
This release adds support for tab completion to all PEX repls running
under Pythons with the readline module available. This tab completion
support is on-par with newer Python REPL out of the box tab completion
support.
This release fixes a bug in pex3 lock update for updates that leave projects unchanged whose primary artifact is an sdist.
This release fixes a bug in pex3 lock update for updates that leave
projects unchanged whose primary artifact is an sdist.
This release optimizes wheel install overhead for warm caches. Notably, this speeds up warm boot for PEXes containing large distributions like PyTorch
This release optimizes wheel install overhead for warm caches. Notably, this speeds up warm boot for PEXes containing large distributions like PyTorch as well as creating venvs from them.
This release brings support for --pip-version 23.3.2 along with optimizations that reduce built PEX size for both --include-tools and --venv PEXes (wh
This release brings support for --pip-version 23.3.2 along with
optimizations that reduce built PEX size for both --include-tools and
--venv PEXes (which includes the Pex PEX) as well as reduce PEX build
time for --pre-install-wheels PEXes (the default) and PEX cold first
boot time for --no-pre-install-wheels PEXes that use more than one
parallel install job.
Pip.spawn_install_wheel & optimize. (#2305)This release brings three new features:
This release brings three new features:
--python-shebang, an appropriate shebang is chosen correctly in
more cases than previously and a warning is emitted when the shebang
chosen cannot be guaranteed to be correct. The common case this
helps select the appropriate shebang for is PEXes built using
--platform or --complete-platform.--no-pre-install-wheels to cut down
PEX build times with a tradeoff of roughly 10% greater boot overhead
upon the 1st execution of the PEX file. For PEXes with very large
dependency sets (machine learning provides common cases), the build
time savings can be dramatic.--max-install-jobs at PEX
build time or by setting the PEX_MAX_INSTALL_JOBS environment
variable at runtime.The last two features come with complicated tradeoffs and are turned off
by default as a result. If you think they might help some of your use
cases, there is more detail in the command line help for
--no-pre-install-wheels and --max-install-jobs as well as in the
pex --help-variables output for PEX_MAX_INSTALL_JOBS. You can also
find a detailed performance analysis in #2292 for the extreme cases of
very small and very large PEXes. In the end though, experimenting is
probably your best bet.
This release fixes Pex runtime sys.path scrubbing to do less work and thus avoid errors parsing system installed distributions with bad metadata.
This release fixes Pex runtime sys.path scrubbing to do less work and
thus avoid errors parsing system installed distributions with bad
metadata.
This release fixes the computation of the hash of the code within a PEX when nested within directories, a bug introduced in 2.1.149.
This release fixes the computation of the hash of the code within a PEX when nested within directories, a bug introduced in 2.1.149.
This release brings support for a new --exclude PEX build option that allows eliding selected resolved distributions from the final PEX. This is an ad
This release brings support for a new --exclude <req> PEX build option
that allows eliding selected resolved distributions from the final PEX.
This is an advanced feature that will, in general, lead to broken PEXes
out of the box; so read up on the --exclude command line help to make
sure you understand the consequences.
This release also brings a fix for --inject-env that ensures the
specified environment variables are always injected to the PEX at
runtime regardless of the PEX entry point exercised.
--exclude <req>. (#2281)This release brings support for --pip-version 23.3.1.
This release brings support for --pip-version 23.3.1.
Fix --style universal lock handing of none ABI wheels with a specific Python minor version expressed in their wheel tag. There are not many of these i
Fix --style universal lock handing of none ABI wheels with a
specific Python minor version expressed in their wheel tag. There are
not many of these in the wild, but a user discovered the case of
python-forge 18.6.0 which supplies 1 file on PyPI:
python_forge-18.6.0-py35-none-any.whl.
Add support to the Pex for checking if built PEXes are valid Python zipapps. Currently, Python zipapps must reside in 32 bit zip files due to limitati
Add support to the Pex for checking if built PEXes are valid Python
zipapps. Currently, Python zipapps must reside in 32 bit zip files due
to limitations of the stdlib zipimport module's zipimporter; so this
check amounts to a check that the built PEX zip does not use ZIP64
extensions. The check is controlled with a new
--check {none,warn,error} option, defaulting to warn.
Add support for --use-pip-config to allow the Pip Pex calls to read PIP_* env vars and Pip configuration files. This can be particularly useful for pi
Add support for --use-pip-config to allow the Pip Pex calls to read
PIP_* env vars and Pip configuration files. This can be particularly
useful for picking up custom index configuration (including auth).
This release brings a fix by new contributor @yjabri for the __pex__ import hook that gets it working properly for --venv mode PEXes.
This release brings a fix by new contributor @yjabri for the __pex__
import hook that gets it working properly for --venv mode PEXes.
This release broadens the range of the flit-core build system Pex uses to include 3.x, which is known to work for modern Python versions and Pex's exi
This release broadens the range of the flit-core build system Pex uses
to include 3.x, which is known to work for modern Python versions and
Pex's existing build configuration.
This release fixes Pex to build PEX files with deterministic file order regardless of the operating system / file system the PEX was built on.
This release fixes Pex to build PEX files with deterministic file order regardless of the operating system / file system the PEX was built on.
This release fixes Pex to work by default under eCryptFS home dirs.
This release fixes Pex to work by default under eCryptFS home dirs.
This release fixes Pex to handle Pip backtracking due to sdist build errors when attempting to extract metadata.
This release fixes Pex to handle Pip backtracking due to sdist build errors when attempting to extract metadata.
This release fixes the Pex CLI to work when run from a read-only installation. A prominent example of this comes in certain nix setups.
This release fixes the Pex CLI to work when run from a read-only installation. A prominent example of this comes in certain nix setups.
This release fixes several spurious warnings emitted for Python 3.11 and 3.12 users and fixes a leak of Pex's vendored attrs when using the __pex__ im
This release fixes several spurious warnings emitted for Python 3.11 and
3.12 users and fixes a leak of Pex's vendored attrs when using the
__pex__ import hook.
This release brings support for Python 3.12 and Pip 23.2 which is the minimum required Pip version for Python 3.12. N.B.: Since Pip 23.2 requires Pyth
This release brings support for Python 3.12 and Pip 23.2 which is the minimum required Pip version for Python 3.12. N.B.: Since Pip 23.2 requires Python 3.7 or newer, multiplatform PEX files and locks that support Python 3.12 will not also be able to support Python 2.7, 3.5 or 3.6 even though Pex continues to support those versions generally.
In addition, two new options for adding local project source files to
a pex are added: -P/--package and -M/--module. Importantly, you can
use the options instead of the existing -D/--sources-directory when
you have a project with code at the top level (i.e.: not in a src/
subdirectory for example) intermixed with other files you prefer not to
include in the PEX. See pex --help for more details on using these new
options.
Finally, an internal API is fixed that allows for Lambdex files to
include versions of attrs incompatible with Pex's own vendored version.
pex.pex_bootstrapper.bootstrap_pex_env leak. (#2184)This release brings fixes for two obscure corner cases.
This release brings fixes for two obscure corner cases.
Previously, if you used --venv PEXes in the default symlinked
site-packages mode that contained first party code in a namespace
package shared with 3rd-party dependencies the first party code would
contaminate the Pex installed wheel cache for one of the 3rd-party
dependencies in PEX.
Even more obscure (the only known issue was in Pex's own CI), if you
ran the Pex CLI concurrently using two different --pip-version
arguments, you may have seen spurious Pip HTTP errors that found an
invalid Content-Type: Unknown header.
This release fixes a long-standing bug in lock file creation for exotic locking scenarios pulling the same project from multiple artifact sources (any
This release fixes a long-standing bug in lock file creation for exotic locking scenarios pulling the same project from multiple artifact sources (any mix of URLs, VCS and local project directories).
This release adds the pex3 lock export-subset command. This is a version of pex3 lock export that also accepts requirements arguments allowing just a
This release adds the pex3 lock export-subset command. This is a
version of pex3 lock export that also accepts requirements arguments
allowing just a subset of the lock satisfying the given requirements to
be exported.
pex3 lock export-subset. (#2145)This release brings support for pex3 venv {inspect,create} for working with venvs directly using Pex. Previously, a PEX built with --include-tools (or
This release brings support for pex3 venv {inspect,create} for working
with venvs directly using Pex. Previously, a PEX built with
--include-tools (or --venv) had the capability of turning itself
into a venv but the new pex3 venv create command can do this for any
PEX file with the addition of a few new features:
pip install --target. This style layout can also be
zipped and prefixed. Additionally, it supports --platform and
--complete-platform allowing creation of, for example, an AWS
Lambda (or Lambda Layer) deployment zip on a non-Linux host.Additionally, this release adds support for Pip 23.1.1 and 23.1.2.
This release fixes pex3 lock create gathering of sdist metadata for PEP-517 build backends with non-trivial get-requires-for-build-wheel requirements.
This release fixes pex3 lock create gathering of sdist metadata for
PEP-517 build backends with non-trivial get-requires-for-build-wheel
requirements.
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)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)Your coding agent can read these notes before it upgrades. Set up the MCP server →