Skip to content

ResolutionImpossible error message #8377

@ei8fdb

Description

@ei8fdb

This ticket is work in progress.

What is the user story

As a pip user when pip can't resolve package dependencies, I need it to help me find a solution, so that I can install the packages I require.

What's the problem this will solve?
When a user tries to install a combination of packages, due to conflicting dependencies, pip is unable to complete the install. With the new resolver we are trying to improve the error messages to help users achieve the goal (of installing packages).

The objectives of these error messages are to communicate to pip users:

  1. what has happened
  2. what specifically has caused their dependency conflict
  3. provide them with some possible ways to troubleshoot the conflict and achieve their goal (of installing packages)

Describe the solution you'd like
An error message that has the following structure:

  1. displays what the error is (i.e. what the user has tried to do)
  2. displays what has caused the error
  3. displays possible ways to solve the error

Iterations
NB: the error messages displayed here are based on #8220.

The first iteration is:

Iteration 1: Error message contains - what the error is, what caused it, and possible ways to solve it
pip install ward==0.44.1b0 py2neo==4.3.0 --unstable-feature=resolver
Collecting ward==0.44.1b0
  Downloading ward-0.44.1b0-py3-none-any.whl (28 kB)
Collecting py2neo==4.3.0
  Downloading py2neo-4.3.0.tar.gz (71 kB)
     |████████████████████████████████| 71 kB 4.8 MB/s
ERROR: Cannot install ward v0.44.1b0 and py2neo v4.3.0 because these package versions have conflicting dependencies.
The conflict is caused by:
    ward 0.44.1b0 depends on pygments <3.0.0,>=2.4.2 (lower than 3.0.0 but greater or equal to 2.4.2)
    py2neo 4.3.0 depends on pygments ~=2.3.1 (approximately equal to version 2.3.1)

There are a number of possible solutions. You can try:
    removing package versions from your requirements, and letting pip try to resolve the problem for you
    trying a version of ward that depends on pygments v2.3.1. Try pip-search ward --dep pygments~=2.3.1
    replacing ward or py2neo with a different package altogether
    patching py2neo to use pygments <3.0.0,>=2.4.2
    force installing (Be aware!)

For instructions on how to do these steps visit: https://pypa.io/SomeLink"
To debug this further you can run pip-tree to see all of your dependencies.
Iteration 2: Error message contains - what the error is, what caused it, and a link to documentation for possible ways to solve it
pip install ward==0.44.1b0 py2neo==4.3.0 --unstable-feature=resolver
Collecting ward==0.44.1b0
  Downloading ward-0.44.1b0-py3-none-any.whl (28 kB)
Collecting py2neo==4.3.0
  Downloading py2neo-4.3.0.tar.gz (71 kB)
     |████████████████████████████████| 71 kB 4.8 MB/s
ERROR: Cannot install ward v0.44.1b0 and py2neo v4.3.0 because these package versions have conflicting dependencies.
The conflict is caused by:
    ward 0.44.1b0 depends on pygments <3.0.0,>=2.4.2
    py2neo 4.3.0 depends on pygments ~=2.3.1

There are a number of possible solutions. For instructions on how to do these steps visit: https://pypa.io/SomeLink"

Reactions to 1st proposal
The main reaction from the team has been that:

Alternative Solutions
The ideal solution would be:

  • all python packages can be installed in whatever combination the user desires, or
  • pip is able to resolve all dependency conflicts automatically and with no input from the users

These are not possible! :)

Additional context
To give a concrete example of what this error message would look like see #8220.

How can we do this?
We will test the iteration 2 error message content with pip users.

What we need to do this design or research

  • research other package managers
  • access to users
  • write a testing plan for the these error messages

This ticket is work in progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXUser experience related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions