Skip to content

Include all resolution conflict fix info in error messages or on stderr. #9420

@jsirois

Description

@jsirois

What's the problem this feature will solve?
In non-interactive pip use, the failure message for resolve conflicts does not carry the actionable information.

Describe the solution you'd like
It would be great if the actionable information was moved from an info-level log to logging that went to stderr or else into the error message itself.

For example, the current error information is excellent in interactive use:

$ pip install --target=test wheel==0.33.6 pantsbuild.pants==1.24.0.dev2
Collecting pantsbuild.pants==1.24.0.dev2
  Using cached pantsbuild.pants-1.24.0.dev2-cp36-abi3-manylinux1_x86_64.whl (37.5 MB)
ERROR: Cannot install pantsbuild-pants==1.24.0.dev2 and wheel==0.33.6 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested wheel==0.33.6
    pantsbuild-pants 1.24.0.dev2 depends on wheel==0.31.1

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

However, when used non-interactively, the useful information is suppressed in common scenarios where stdout is hidden or quiet mode is used:

$ pip install --target=test --quiet wheel==0.33.6 pantsbuild.pants==1.24.0.dev2
ERROR: Cannot install pantsbuild-pants==1.24.0.dev2 and wheel==0.33.6 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Alternative Solutions
For now, in my non-interactive use of pip I have resorted to capturing pip output using --log and then searching for ERROR: Cannot install ... because these package versions have conflicting dependencies. and grabbing all the lines between that and the following ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions