Skip to content

pip 21.1 fails with ResolutionTooDeep while 21.0.1 exits with clear error #9841

Closed
@nmgeek

Description

@nmgeek

Description

pip 21.0.1 has no error and highlights the dependency error right away while pip 2.1 runs for minutes then throws a ResolutionTooDeep exception.

Expected behavior

pip version 21.0.1 produces the expected output which includes this diagnostic:

The conflict is caused by:
The user requested hyperlink==19.0.0
    autobahn 20.12.3 depends on hyperlink>=20.0.1

pip version

21.1

Python version

3.6.13

OS

Ubuntu 16.04.7 LTS

How to Reproduce

  1. Create a python3.6 virtualenv
  2. activate
  3. Ensure pip v21.1 is installed in the virtualenv
  4. run pip -r r.txt where r.txt has this content:
attrs==19.3.0
autobahn==20.6.2
hyperlink==19.0.0
cffi==1.14.0
cryptography>=3.2
idna==2.10
pycparser==2.20
txaio==20.4.1
  1. Replace autobahn==20.6.2 with autobahn==20.12.3 in r.txt
  2. run pip -r r.txt

Output

Lots of spew, then:

  Requirement already satisfied: txaio==20.4.1 in ./venv/lib/python3.6/site-packages (from -rr test.txt (line 8)) (20.4.1)
  INFO: pip is looking at multiple versions of attrs to determine which version is compatible with other requirements. This could take a while.

Then pip seems to hang.  If you wait long enough: 5 minutes? it prints:

ERROR: Exception:
Traceback (most recent call last):
  File "/home/sigma/dev/contour/daqAdaptor/venv/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 180, in _main
    status = self.run(options, args)
  File "/home/sigma/dev/contour/daqAdaptor/venv/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 204, in wrapper
    return func(self, options, args)
  File "/home/sigma/dev/contour/daqAdaptor/venv/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 319, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/home/sigma/dev/contour/daqAdaptor/venv/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 128, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep
  File "/home/sigma/dev/contour/daqAdaptor/venv/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 473, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/sigma/dev/contour/daqAdaptor/venv/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 384, in resolve
    raise ResolutionTooDeep(max_rounds)
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 2000000

Code of Conduct

Metadata

Metadata

Assignees

Labels

type: bugA confirmed bug or unintended behavior

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions