Skip to content

pip default output does not tell which packages have conflicts when problem is discovered #12650

@aaltat

Description

@aaltat

Description

When doing pip install x y z and if packages have a dependency conflict then pip will tell this:

INFO: pip is looking at multiple versions of KKKKKKK to determine which version is compatible with other requirements. This could take a while.

when the first dependency problem is noticed.

Which is correct, but it would be better logging if pip would by default tell what packages have conflict on which dependency. Pip knows the the incompatible packages, but it only displays the information when logging is increased.

I know that in the end pip gives a better error description, but if the dependency tree is complicated then resolving the dependencies might take more time than the maximum run time of the job in CI. In this case the job is deleted before the pip resolves all possible dependency combinations and pip does not have time to display the better error message.

Expected behavior

Instead of online info message, I would like to see something like this:

INFO: pip is looking at multiple versions of KKKKKKK to determine which version is compatible with other requirements. This could take a while.
Will try a different candidate, due to conflict:
  XXXXX 1.1.1 depends on packaging
  KKKKKKK 2.2.2 depends on packaging<23 and >=21
  ZZZZZZZ 3.3.3 depends on packaging>=23.2

This extra information would greatly speedup the manual dependency resolution, because the problem would be clearly available in the CI system console and user would not have to run the same command locally with extra logging enabled.

pip version

24.0

Python version

3.11.4

OS

Mac M1

How to Reproduce

  1. from shell give command: pip install numpy==1.20.1 seaborn

Which leads similar case as I have in CI with different packages. Pip does not exit cleanly (at least on my Mac M1) and it emulates the job deletion in CI.

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    S: needs triageIssues/PRs that need to be triagedtype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions