question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New resolver error message is confusing if a package has inconsistent dependencies

See original GitHub issue

Given 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.

cc @nlhkabu @pfmoore

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:open
  • Created 3 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
nlhkabucommented, Oct 22, 2020

New issue opened to look at adding dep tree to error message: https://github.com/pypa/pip/issues/9036

1reaction
nlhkabucommented, Oct 13, 2020

Note: if we update the error messages here, we will also need to update the documentation

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found