Confusing conflict message error message when pip can't build metadata for any version of package required
See original GitHub issueDescription
I was testing the following installation failure in https://github.com/pypa/pip/issues/10473 . It fails to install because one of the dependencies (weblogo) requires numpy to be installed to run it’s setup.py
and it skips over each version of weblogo and then attempts backtracking down the wrong path.
ERROR: Cannot install dms-tools2 because these package versions have conflicting dependencies.
The conflict is caused by:
phydms 2.4.1 depends on weblogo<3.6 and >=3.4
phydms 2.4.0 depends on weblogo<3.6 and >=3.4
phydms 2.3.8 depends on weblogo<3.6 and >=3.4
phydms 2.3.7 depends on weblogo<3.6 and >=3.4
phydms 2.3.6 depends on weblogo<3.6 and >=3.4
phydms 2.3.5 depends on weblogo<3.6 and >=3.4
phydms 2.3.4 depends on weblogo<3.6 and >=3.4
phydms 2.3.3 depends on weblogo<3.6 and >=3.4
phydms 2.3.2 depends on weblogo<3.6 and >=3.4
phydms 2.3.1 depends on weblogo<3.6 and >=3.4
phydms 2.3.0 depends on weblogo<3.6 and >=3.4
phydms 2.2.2 depends on weblogo<3.6 and >=3.4
phydms 2.2.1 depends on weblogo<3.6 and >=3.4
phydms 2.2.0 depends on weblogo<3.6 and >=3.4
phydms 2.1.4 depends on weblogo<3.6 and >=3.4
phydms 2.1.3 depends on weblogo<3.6 and >=3.4
phydms 2.1.2 depends on weblogo<3.6 and >=3.4
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Expected behavior
It would be useful to let the user know that the reason this is conflicting is because there were no valid installs avaiable for these version numbers, e.g.:
The conflict is caused by:
phydms 2.4.1 depends on weblogo<3.6 and >=3.4 (no valid package available)
phydms 2.4.0 depends on weblogo<3.6 and >=3.4 (no valid package available)
...
Given what I know about the pip code base this is probably tricky to implement? But I do think it’s difficult for the user to parse the error message right now as pip is giving non-conflicting dependencies and saying they are conflicting.
pip version
21.3.1
Python version
all
OS
all
How to Reproduce
- On Linux
- sudo apt-get install build-essential
- python3 -m venv .venv
- source activate ./venv/bin/activate
- python -m pip install Cython (one of the other dependencies depends on Cython otherwise you get a similar error but with
pysam
instead ofweblogo
) - python -m pip install dms-tools2
Output
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Edit: Note I edited this first post to reflect the current situation.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Yeah that’s why I closed it, but then I was a bit unsure and thought there might still be a way to reproduce it. I’ll have a think and open a new issue if there’s a specific way to reproduce it still.
Maybe failed to build package from source would be easier to understand for users? Not sure about the best wording here, the overall idea sounds good to me.