Comments (5)
Please try adding --pip-version latest
to your Pex command line. I can explain what's going on later.
from pex.
Hi @jsirois, thank you for the quick feedback and the suggested solution!
In fact, adding the --pip-version latest
argument fixed the problem. 😊
We were also wondering whether there is a way to use the pip version already available in the venv.
We are very much looking forward to your explanation 😉
from pex.
But we cannot explain why it is called during the pex build process.
It's called during any Python build or resolve process because methodtools 0.4.7 is a source distribution: https://pypi.org/project/methodtools/0.4.7/#files. In order for Pip to resolve methodtools dependencies or Pex to build a wheel from it (Pex requires wheels), the sdist must be ~built. Building the sdist requires evaluating its setup.py.
So that's the why. The reason this is a problem in Pex (with default settings) and not Pip is Pex's default settings are backwards compatible to Pex 2.0.0 which used a patched version of Pip 20.3.4, and - more to the point, a patched version of setuptools. That patched version of setuptools is here: https://github.com/pex-tool/pex/tree/main/pex/vendor/_vendored/setuptools/setuptools-44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863.dist-info and the version is 44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863
. The methodtools setup.py
code assume a version of the form X.Y.Z
with X, Y and Z all being integers. Here, the Pex vendored patched version of setuptools has a +3ac...
local version identifier suffix that defeats the methodtools setup.py
assumption.
The fix --pip-version latest
could in fact be --pip-version <any version except the default>
, see pex --help
for all the supported values of --pip-version
. All versions of Pip except the default use a production release of setuptools with a version in the standard X.Y.Z
form; thus the fix.
You probably want to read more of the Pex CLI --help
since features and options are added frequently to improve performance and compatibility, but they are never defaulted to since Pex never wants to break existing users.
from pex.
@Github-dm-CDE I'm going to close this as an answered question, but please speak up if this is still confusing.
from pex.
Hi @jsirois , thank you very much for your explanation!
from pex.
Related Issues (20)
- How to bootstrap external pex files within running Python interpreter HOT 23
- Finalize Python 3.13 support HOT 1
- Build fails/incomplete on requirements.txt schema not followed correctly HOT 9
- Allow subsetting a PEX lockfile in PEX format, not just pip HOT 12
- Support for pip-compile generated requirements with hashes HOT 8
- bdist_pex called from tox fails with python 3.12 HOT 7
- Regression of artifact URL due to change since pip 23.3 HOT 12
- Monkey patch warning when using PEX to run a gunicorn app HOT 6
- `pex3 lock export` can turn VCS requirements into PyPI ones, resulting in hash failures HOT 3
- A way to configure sys.executable flags at PEX runtime HOT 8
- Add support for `--override`ing transitive dependencies. HOT 1
- Add `--provided`: like `--exclude`, but require the excluded project is available at boot time.
- "Resolving wheels disallowed" error when using `--lock` and `--only-binary` HOT 3
- Add more distribution metadata parsing context to failures.
- Add support for Pip 24.2 / statically linked musl libc CPythons
- Adding support to have all command line flags respected via environment variables HOT 6
- How does pex resolve defaut `--pip-version` HOT 13
- Support `--scie-pbs-flavor`. HOT 3
- Support `--scie` for PyPy.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pex.