Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
nmgeek opened this issue Apr 25, 2021 · 6 comments · Fixed by #9993
Closed
1 task done

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

nmgeek opened this issue Apr 25, 2021 · 6 comments · Fixed by #9993
Assignees
Labels
type: bug A confirmed bug or unintended behavior

Comments

@nmgeek
Copy link

nmgeek commented Apr 25, 2021

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

@nmgeek nmgeek added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Apr 25, 2021
@uranusjr uranusjr changed the title pip 2.1 dies unnecessarily with ResolutionTooDeep exception pip 21.1 fails with ResolutionTooDeep while 21.0.1 exits with clear error Apr 25, 2021
@uranusjr
Copy link
Member

FYI the versions are 21.0.1 and 21.1, not 2.0 and 2.1. You’re one digit off.

@uranusjr uranusjr added C: new resolver and removed S: needs triage Issues/PRs that need to be triaged labels Apr 25, 2021
@uranusjr uranusjr self-assigned this Apr 25, 2021
@uranusjr uranusjr added this to the 21.1 milestone Apr 25, 2021
@sbidoul sbidoul modified the milestones: 21.1, 21.1.1 Apr 25, 2021
@nmgeek
Copy link
Author

nmgeek commented Apr 25, 2021

Ahh. What's a digit here or there :) I updated the original comment.

@junpuf
Copy link

junpuf commented Apr 29, 2021

I'm also facing this error.

@uranusjr
Copy link
Member

@junpuf Please describe what you were doing when you encountered the issue.

@sbidoul sbidoul removed this from the 21.1.1 milestone Apr 30, 2021
@junpuf
Copy link

junpuf commented May 9, 2021

Hi @uranusjr
Sorry for the delayed response.

I have seen this error from one of my conda environment build process using environment.yml, and pip dependencies were used and listed below:

"boto3",
"s3fs",
"multi-model-server==1.1.2",
"keras-mxnet==2.2.4.2",
"opencv-python==4.5.1.48"

Below are the error message.

Collecting aiobotocore>=1.0.1
Downloading aiobotocore-1.3.0.tar.gz (48 kB)
Downloading aiobotocore-1.2.2.tar.gz (48 kB)
Downloading aiobotocore-1.2.1.tar.gz (48 kB)
Downloading aiobotocore-1.2.0.tar.gz (47 kB)
Downloading aiobotocore-1.1.2-py3-none-any.whl (45 kB)
Downloading aiobotocore-1.1.1-py3-none-any.whl (45 kB)
Downloading aiobotocore-1.1.0-py3-none-any.whl (43 kB)
Downloading aiobotocore-1.0.7-py3-none-any.whl (42 kB)
Downloading aiobotocore-1.0.6-py3-none-any.whl (42 kB)
Downloading aiobotocore-1.0.5-py3-none-any.whl (42 kB)
Downloading aiobotocore-1.0.4-py3-none-any.whl (41 kB)
Downloading aiobotocore-1.0.3-py3-none-any.whl (40 kB)
Downloading aiobotocore-1.0.2-py3-none-any.whl (40 kB)
Downloading aiobotocore-1.0.1-py3-none-any.whl (40 kB)
INFO: pip is looking at multiple versions of fsspec to determine which version is compatible with other requirements. This could take a while.
Pip subprocess error:
ERROR: Exception:
...
...
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 2000000
··failed
CondaEnvException: Pip failed

@uranusjr
Copy link
Member

Thanks for the test cases! I have identified the issue and will post a patch shortly.

inmantaci added a commit to inmanta/inmanta-core that referenced this issue May 24, 2021
Bumps [pip](https://github.com/pypa/pip) from 21.1.1 to 21.1.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p>
<blockquote>
<h1>21.1.2 (2021-05-23)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>New resolver: Correctly exclude an already installed package if its version is
known to be incompatible to stop the dependency resolution process with a clear
error message. (<code>[#9841](pypa/pip#9841) &lt;https://github.com/pypa/pip/issues/9841&gt;</code>_)</li>
<li>Allow ZIP to archive files with timestamps earlier than 1980. (<code>[#9910](pypa/pip#9910) &lt;https://github.com/pypa/pip/issues/9910&gt;</code>_)</li>
<li>Emit clearer error message when a project root does not contain either
<code>pyproject.toml</code>, <code>setup.py</code> or <code>setup.cfg</code>. (<code>[#9944](pypa/pip#9944) &lt;https://github.com/pypa/pip/issues/9944&gt;</code>_)</li>
<li>Fix detection of existing standalone pip instance for PEP 517 builds. (<code>[#9953](pypa/pip#9953) &lt;https://github.com/pypa/pip/issues/9953&gt;</code>_)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/pip/commit/8737f903eaa9475e1b7693e436d9bdf17e46e43a"><code>8737f90</code></a> Bump for release</li>
<li><a href="https://github.com/pypa/pip/commit/d7cf6cacdee550983686692d0d463ad493cb993d"><code>d7cf6ca</code></a> Update AUTHORS.txt</li>
<li><a href="https://github.com/pypa/pip/commit/30faa6478edbc1e54498b7cbb20111d75a96d2dd"><code>30faa64</code></a> Fix duplicate top line in NEWS.rst</li>
<li><a href="https://github.com/pypa/pip/commit/128ec362547fe11f8b3c6402687a00a06e7f6e51"><code>128ec36</code></a> Test case for backtracking an installed candidate</li>
<li><a href="https://github.com/pypa/pip/commit/729c626da75b25af0640a77efdbbfc57e567e1f9"><code>729c626</code></a> Exclude a known incompatible installed candidate</li>
<li><a href="https://github.com/pypa/pip/commit/1c31d3314c42d19b354f376991db2b33134dde5e"><code>1c31d33</code></a> Update src/pip/_internal/build_env.py</li>
<li><a href="https://github.com/pypa/pip/commit/e266aa55ac6484d33c36aee7082243edd669e2a8"><code>e266aa5</code></a> Update news/9910.bugfix.rst</li>
<li><a href="https://github.com/pypa/pip/commit/00003d5325b333290b4bcde17791ed3a489562d0"><code>00003d5</code></a> 9910 news</li>
<li><a href="https://github.com/pypa/pip/commit/d55e02c71673f4332c191cf8095360c5900f7c6e"><code>d55e02c</code></a> Set strict_timestamps=False when zip is called for isolated environment</li>
<li><a href="https://github.com/pypa/pip/commit/4f983c4476251c83bc320ebaaff0cb9b71d2e981"><code>4f983c4</code></a> Handle standalone pip creation from pip wheel</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/21.1.1...21.1.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=21.1.1&new-version=21.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants