-
-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message when constraints conflict with requirements. #1200
Comments
Upgrading vendored Pip will fix this: pypa/pip#9300; so this is just blocked on dropping Python 2 support in Pex. |
I'm going to close this as fixed since you can now use :; cat constraints.txt
pex==2.1.27
:; pex --python python3.8 pex==2.1.28 --constraint constraints.txt --pip-version latest
pid 518077 -> /home/jsirois/.cache/pex/venvs/0/878245defe5cf7850888db6ca8ac0dfd371cb319/05ac1c1e24762083e2c9af13d44377083b7e8668/bin/python -sE /home/jsirois/.cache/pex/venvs/0/878245defe5cf7850888db6ca8ac0dfd371cb319/05ac1c1e24762083e2c9af13d44377083b7e8668/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /home/jsirois/.cache/pex/pip/0/24.2/pip_cache --log /tmp/pex-pip-log.t44qpfyg/pip.log download --dest /home/jsirois/.cache/pex/downloads/0/resolver_download.wgg7nj6u/home.jsirois..pyenv.versions.3.8.20.bin.python3.8 --constraint constraints.txt pex==2.1.28 --retries 5 --timeout 15 exited with 1 and STDERR:
pip: ERROR: Cannot install pex==2.1.28 because these package versions have conflicting dependencies.
pip: ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
pip:
pip: The conflict is caused by:
pip: The user requested pex==2.1.28
pip: The user requested (constraint) pex==2.1.27
pip:
pip: To fix this you could try to:
pip: 1. loosen the range of package versions you've specified
pip: 2. remove package versions to allow pip to attempt to solve the dependency conflict Footnotes
|
Right now straight pip gives:
There is no extra useful information to gather even in the verbose logs.
Pex could use the full requirements / constraints parsing it is now capable of and either fail fast or else hold information in reserve anticipating Pip failing. Pairs of requirement / constraint could be compared to make sure they were compatible. This would require something like https://pypi.org/project/python-ranges/ but that lib is python 3.6+.
The text was updated successfully, but these errors were encountered: