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

pipenv waits seemingly forever to lock the following dependency list #4945

Closed
gnu-lorien opened this issue Feb 4, 2022 · 5 comments
Closed

Comments

@gnu-lorien
Copy link

Issue description

With the following package list, pipenv lock never seems to succeed. It seems to be looping trying to resolve h11 and anyio. If I remove http3 from the package list then the lock is able to resolve.

[packages]
http3="*"
colorama = { version = ">=0.4.4" }
fastapi = { version = ">=0.61.1" }
jwcrypto = { version = ">=0.8" }
python-dotenv = { version = ">=0.15.0" }
requests =  { version = ">=2.24.0" }
six = { version = ">=1.16.0" }
uvicorn = { version = ">=0.12.2", extras = ['standard'] }
websockets = { version = ">=8.1" }
PyYAML = { version = ">=5.3.1" }
aiohttp = { version = ">=3.8.0" }
aiokafka = { version = "*" }
redis =  { version = ">=3.5.3" }
redis-py-cluster =  { version = ">=2.1.0" }
fastapicommon = { version = ">=1.1.5" }
fastapi-utils = "*"
dateparser = "*"
asynccasbin = "*"
pytest = "*"
networkx = "*"
matplotlib = "*"
deepdiff = "*"
pydot = "*"
jsonpickle = "*"
httpx = "*"

[dev-packages]
lupa = { version = ">=1.9" }
pytest = { version = ">=6.1.2" }
watchgod = { version = ">=0.6" }

[requires]
python_version = "3.9"

Expected result

pipenv lock should either succeed or fail with a meaningful error message about unresolvable dependency. If you remove "http3" from the list then you get success.

Actual result

pipenv lock seems to be stuck looping forever.
If you remove "http3" from the list then you get success.

INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.starting_round(16152)
Reporter.adding_requirement(SpecifierRequirement('anyio==3.*'), LinkCandidate('https://files.pythonhosted.org/packages/e7/38/7b76d3d71c462dc936e333b358a3106e7af913e6c8c9dd5a45684fec08cc/httpcore-0.14.7-py3-none-any.whl#sha256=47d772f754359e56dd9d892d9593b6f9870a37aeb8ba51e9a88b09b3d68cfade (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('anyio==3.*'), LinkCandidate('https://files.pythonhosted.org/packages/e7/38/7b76d3d71c462dc936e333b358a3106e7af913e6c8c9dd5a45684fec08cc/httpcore-0.14.7-py3-none-any.whl#sha256=47d772f754359e56dd9d892d9593b6f9870a37aeb8ba51e9a88b09b3d68cfade (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
Reporter.adding_requirement(SpecifierRequirement('h11<0.13,>=0.11'), LinkCandidate('https://files.pythonhosted.org/packages/e7/38/7b76d3d71c462dc936e333b358a3106e7af913e6c8c9dd5a45684fec08cc/httpcore-0.14.7-py3-none-any.whl#sha256=47d772f754359e56dd9d892d9593b6f9870a37aeb8ba51e9a88b09b3d68cfade (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('h11<0.13,>=0.11'), LinkCandidate('https://files.pythonhosted.org/packages/e7/38/7b76d3d71c462dc936e333b358a3106e7af913e6c8c9dd5a45684fec08cc/httpcore-0.14.7-py3-none-any.whl#sha256=47d772f754359e56dd9d892d9593b6f9870a37aeb8ba51e9a88b09b3d68cfade (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
Reporter.adding_requirement(SpecifierRequirement('anyio==3.*'), LinkCandidate('https://files.pythonhosted.org/packages/f3/75/85083285551d68ac3f5a7ac378b406ac8569615924d9b801e49e1d2b423b/httpcore-0.14.6-py3-none-any.whl#sha256=508401ab24060cfa1e959feda1c38eaa09ccf9074c928f9c3d2864f8921373ce (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('anyio==3.*'), LinkCandidate('https://files.pythonhosted.org/packages/f3/75/85083285551d68ac3f5a7ac378b406ac8569615924d9b801e49e1d2b423b/httpcore-0.14.6-py3-none-any.whl#sha256=508401ab24060cfa1e959feda1c38eaa09ccf9074c928f9c3d2864f8921373ce (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
Reporter.adding_requirement(SpecifierRequirement('h11<0.13,>=0.11'), LinkCandidate('https://files.pythonhosted.org/packages/f3/75/85083285551d68ac3f5a7ac378b406ac8569615924d9b801e49e1d2b423b/httpcore-0.14.6-py3-none-any.whl#sha256=508401ab24060cfa1e959feda1c38eaa09ccf9074c928f9c3d2864f8921373ce (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('h11<0.13,>=0.11'), LinkCandidate('https://files.pythonhosted.org/packages/f3/75/85083285551d68ac3f5a7ac378b406ac8569615924d9b801e49e1d2b423b/httpcore-0.14.6-py3-none-any.whl#sha256=508401ab24060cfa1e959feda1c38eaa09ccf9074c928f9c3d2864f8921373ce (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
Reporter.adding_requirement(SpecifierRequirement('anyio==3.*'), LinkCandidate('https://files.pythonhosted.org/packages/84/df/fc07a289a28238c7356c6589eada4524db34ad0dd584dda89dd816a02ac1/httpcore-0.14.5-py3-none-any.whl#sha256=2621ee769d0236574df51b305c5f4c69ca8f0c7b215221ad247b1ee42a9a9de1 (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('anyio==3.*'), LinkCandidate('https://files.pythonhosted.org/packages/84/df/fc07a289a28238c7356c6589eada4524db34ad0dd584dda89dd816a02ac1/httpcore-0.14.5-py3-none-any.whl#sha256=2621ee769d0236574df51b305c5f4c69ca8f0c7b215221ad247b1ee42a9a9de1 (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
Reporter.adding_requirement(SpecifierRequirement('h11<0.13,>=0.11'), LinkCandidate('https://files.pythonhosted.org/packages/84/df/fc07a289a28238c7356c6589eada4524db34ad0dd584dda89dd816a02ac1/httpcore-0.14.5-py3-none-any.whl#sha256=2621ee769d0236574df51b305c5f4c69ca8f0c7b215221ad247b1ee42a9a9de1 (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('h11<0.13,>=0.11'), LinkCandidate('https://files.pythonhosted.org/packages/84/df/fc07a289a28238c7356c6589eada4524db34ad0dd584dda89dd816a02ac1/httpcore-0.14.5-py3-none-any.whl#sha256=2621ee769d0236574df51b305c5f4c69ca8f0c7b215221ad247b1ee42a9a9de1 (from https://pypi.org/simple/httpcore/) (requires-python:>=3.6)'))
Reporter.backtracking(LinkCandidate('https://files.pythonhosted.org/packages/8a/cc/e53517f4a1e13f74776ca93271caef378dadec14d71c61c949d759d3db69/hpack-3.0.0-py2.py3-none-any.whl#sha256=0edd79eda27a53ba5be2dfabf3b15780928a0dff6eb0c60a3d6767720e970c89 (from https://pypi.org/simple/hpack/)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.backtracking(LinkCandidate('https://files.pythonhosted.org/packages/8a/cc/e53517f4a1e13f74776ca93271caef378dadec14d71c61c949d759d3db69/hpack-3.0.0-py2.py3-none-any.whl#sha256=0edd79eda27a53ba5be2dfabf3b15780928a0dff6eb0c60a3d6767720e970c89 (from https://pypi.org/simple/hpack/)'))
Reporter.backtracking(LinkCandidate('https://files.pythonhosted.org/packages/6f/76/0839a2920c2deb2e69e6edfb3b67c37827f97276a1240ca9375cef528611/frozenlist-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=acb267b09a509c1df5a4ca04140da96016f40d2ed183cdc356d237286c971b51 (from https://pypi.org/simple/frozenlist/) (requires-python:>=3.7)'))
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.backtracking(LinkCandidate('https://files.pythonhosted.org/packages/6f/76/0839a2920c2deb2e69e6edfb3b67c37827f97276a1240ca9375cef528611/frozenlist-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=acb267b09a509c1df5a4ca04140da96016f40d2ed183cdc356d237286c971b51 (from https://pypi.org/simple/frozenlist/) (requires-python:>=3.7)'))
Reporter.ending_round(16152, state)
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.ending_round(16152, state)

Steps to replicate

pipenv install --skip-lock
pipenv lock --verbose

The pipenv --support command seems to include a lot of private information about my machine and environment that I'm not willing to share publicly. Is there a useful subset of this information that might be helpful which doesn't include private information?

Pipenv version: '2022.1.8'

@oz123
Copy link
Contributor

oz123 commented Feb 6, 2022

Please at least which operating system you are using. Without this it might be impossible to solve .. The issue maybe related to missing underlying wheels.

@gnu-lorien
Copy link
Author

Will do.

CentOS 7 x64

@matteius
Copy link
Member

@gnu-lorien I have tested your example with the latest Pipenv 2022.1.8 however I get this message fairly quickly:

$ pipenv install --skip-lock (...)
matteius@matteius-VirtualBox:~/shared-projects/pipenv-triage/pipenv-4945$ pipenv lock
Creating a virtualenv for this project...
Pipfile: /home/matteius/shared-projects/pipenv-triage/pipenv-4945/Pipfile
Using /usr/bin/python3.9 (3.9.7) to create virtualenv...
⠏ Creating virtual environment...created virtual environment CPython3.9.7.final.0-64 in 381ms
  creator CPython3Posix(dest=/home/matteius/.virtualenvs/pipenv-4945-IuKottCh, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/matteius/.local/share/virtualenv)
    added seed packages: pip==22.0.3, setuptools==60.9.3, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /home/matteius/.virtualenvs/pipenv-4945-IuKottCh
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success! 
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed! 

CRITICAL:pipenv.patched.notpip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement fastapicommon>=1.1.5 (from versions: none)
[ResolutionFailure]:   File "/home/matteius/pipenv/pipenv/resolver.py", line 743, in _main
[ResolutionFailure]:       resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]:   File "/home/matteius/pipenv/pipenv/resolver.py", line 704, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:   File "/home/matteius/pipenv/pipenv/resolver.py", line 685, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:   File "/home/matteius/pipenv/pipenv/utils.py", line 1377, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:   File "/home/matteius/pipenv/pipenv/utils.py", line 1106, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/home/matteius/pipenv/pipenv/utils.py", line 884, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for fastapicommon>=1.1.5

@matteius
Copy link
Member

As noted in prior comment this particular issue of slow to output the failure is resolved in latest release and further enhancements to infinity lock issues taking place here: #4926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants