New resolver error message is confusing if a package has inconsistent dependencies
See original GitHub issueGiven this package:
# setup.py
from setuptools import setup
setup(
name='testpkg',
version='1',
# virtualenv==20.0.25 requires six>=1.9.
install_requires=['six<1.9', 'virtualenv==20.0.25'],
)
This produces the following error message:
ERROR: Cannot install testpkg 1 and testpkg because these package versions have conflicting dependencies.
The conflict is caused by:
testpkg 1 depends on six<1.9
virtualenv 20.0.25 depends on six<2 and >=1.9.0
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/stable/user_guide/#dependency-conflicts-resolution-impossible
testpkg
shows up twice in the first ERROR:
message, which looks confusing. It is “correct” that testpkg
is conflicting with itself, but we probably need to produce a message that makes more sense to humans.
Note: I don’t think this should block beta since this kind of packages is already broken, and likely to be relatively rare. And the message is not that bad either; everything after the first line still makes sense in this situation.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (22 by maintainers)
Top Results From Across the Web
Inconsistent dependency errors result when installing via pip ...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the ......
Read more >Understanding Python Packages pip Dependency Resolver ...
When we install a package like this – pip install Flask – pip needs to work out Flask's dependencies, the dependencies of those...
Read more >Dependency Resolution - pip documentation v22.3.1
This section provides practical suggestions to pip users who encounter a ResolutionImpossible error, where pip cannot install their specified packages due to ...
Read more >Upgrading your build from Gradle 6.x to the latest
This may cause errors when you try to delete the root project directory after running a build with TestKit. For example, tests that...
Read more >Troubleshooting - AWS Control Tower
If the reason for the first enrollment failure was that you forgot to create the AWSControlTowerExecution role in the account in advance, the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
New issue opened to look at adding dep tree to error message: https://github.com/pypa/pip/issues/9036
Note: if we update the error messages here, we will also need to update the documentation