Skip to content

Resolution issue when installing a list of wheels #9168

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

Closed
sbidoul opened this issue Nov 27, 2020 · 12 comments
Closed

Resolution issue when installing a list of wheels #9168

sbidoul opened this issue Nov 27, 2020 · 12 comments

Comments

@sbidoul
Copy link
Member

sbidoul commented Nov 27, 2020

Hi folks, a colleague of mine reported a weird issue with the new resolver.

I could confirm it with pip master, today. Python 3.8 on Linux.

Using the following requirements.txt:

asgiref==3.3.1
cffi==1.14.4
cryptography==3.2.1
Django==3.1.3
djangorestframework==3.12.2
drf-jwt==1.17.2
pycparser==2.20
PyJWT==1.7.1
pytz==2020.4
six==1.15.0
sqlparse==0.4.1

pip install -r requirements.txt works fine.

However when building wheels then installing all wheels from the wheelhouse, this fails:

$ pip wheel -r requirements.txt --wheel-dir=wheelhouse
$ pip install wheelhouse/*.whl
Processing ./release/asgiref-3.3.1-py3-none-any.whl
Processing ./release/cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl
Processing ./release/cryptography-3.2.1-cp35-abi3-manylinux2010_x86_64.whl
Processing ./release/djangorestframework-3.12.2-py3-none-any.whl
Processing ./release/Django-3.1.3-py3-none-any.whl
Processing ./release/drf_jwt-1.17.2-py2.py3-none-any.whl
Processing ./release/pycparser-2.20-py2.py3-none-any.whl
Processing ./release/PyJWT-1.7.1-py2.py3-none-any.whl
Processing ./release/pytz-2020.4-py2.py3-none-any.whl
Processing ./release/six-1.15.0-py2.py3-none-any.whl
Processing ./release/sqlparse-0.4.1-py3-none-any.whl
Collecting PyJWT[crypto]<2.0.0,>=1.5.2
  Using cached PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
  Using cached PyJWT-1.7.0-py2.py3-none-any.whl (18 kB)
  Using cached PyJWT-1.6.4-py2.py3-none-any.whl (19 kB)
  Using cached PyJWT-1.6.3-py2.py3-none-any.whl (19 kB)
  Using cached PyJWT-1.6.1-py2.py3-none-any.whl (18 kB)
  Using cached PyJWT-1.6.0-py2.py3-none-any.whl (18 kB)
  Using cached PyJWT-1.5.3-py2.py3-none-any.whl (17 kB)
  Using cached PyJWT-1.5.2-py2.py3-none-any.whl (17 kB)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of sqlparse to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pytz to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyjwt to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pycparser to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of drf-jwt to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of djangorestframework to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of django to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cryptography to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cffi to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of asgiref to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl), pyjwt[crypto]==1.5.2, pyjwt[crypto]==1.5.3, pyjwt[crypto]==1.6.0, pyjwt[crypto]==1.6.1, pyjwt[crypto]==1.6.3, pyjwt[crypto]==1.6.4, pyjwt[crypto]==1.7.0 and pyjwt[crypto]==1.7.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.7.1 depends on pyjwt 1.7.1 (from https://files.pythonhosted.org/packages/87/8b/6a9f14b5f781697e51259d81657e6048fd31a113229cf346880bb7545565/PyJWT-1.7.1-py2.py3-none-any.whl#sha256=5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.7.0 depends on pyjwt 1.7.0 (from https://files.pythonhosted.org/packages/02/9b/16c92330f1fb76e3f6372ba6f804d412ec894ee1d9ea31516269b5f6add4/PyJWT-1.7.0-py2.py3-none-any.whl#sha256=00414bfef802aaecd8cc0d5258b6cb87bd8f553c2986c2c5f29b19dd5633aeb7 (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.6.4 depends on pyjwt 1.6.4 (from https://files.pythonhosted.org/packages/93/d1/3378cc8184a6524dc92993090ee8b4c03847c567e298305d6cf86987e005/PyJWT-1.6.4-py2.py3-none-any.whl#sha256=30b1380ff43b55441283cc2b2676b755cca45693ae3097325dea01f3d110628c (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.6.3 depends on pyjwt 1.6.3 (from https://files.pythonhosted.org/packages/77/11/4ccc1f4f8d812a6459e53f4f33107ae5d25babed9e6c1f0c6923b1fa8966/PyJWT-1.6.3-py2.py3-none-any.whl#sha256=d527c3330d83d7278a0a8ef570b7c9c39fbf2c0c1edbe564a1a8a02d5352322b (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.6.1 depends on pyjwt 1.6.1 (from https://files.pythonhosted.org/packages/31/8f/19c302aa9a391dd1fbd249362b749021b88d40fb59af0363939a2250afed/PyJWT-1.6.1-py2.py3-none-any.whl#sha256=bca523ef95586d3a8a5be2da766fe6f82754acba27689c984e28e77a12174593 (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.6.0 depends on pyjwt 1.6.0 (from https://files.pythonhosted.org/packages/fc/fd/02c195aa48beef5e4b018259634dd885fa1a9df351c708a8486e7ddf2216/PyJWT-1.6.0-py2.py3-none-any.whl#sha256=b752500cafd4df9f0dc6efe9063603e36a4e1a5c24fee48234d2949b6606aa59 (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.5.3 depends on pyjwt 1.5.3 (from https://files.pythonhosted.org/packages/8a/a6/4d931a2c77a224d27c78382f4ce8ec07542d4426ea2793bea77a689273c2/PyJWT-1.5.3-py2.py3-none-any.whl#sha256=a4e5f1441e3ca7b382fd0c0b416777ced1f97c64ef0c33bfa39daf38505cfd2f (from https://pypi.org/simple/pyjwt/))
    The user requested pyjwt 1.7.1 (from /home/sbi-local/ACSONE/OpenErp/django-lns/release/PyJWT-1.7.1-py2.py3-none-any.whl)
    pyjwt[crypto] 1.5.2 depends on pyjwt 1.5.2 (from https://files.pythonhosted.org/packages/46/63/9e57342802642c447f0620dea41a18033abbb466af9417543295ab56b8b9/PyJWT-1.5.2-py2.py3-none-any.whl#sha256=9e7d780c30cd03bb0d29510b03e09caa95c6d880b3897450eb0f2d1678d3e5b1 (from https://pypi.org/simple/pyjwt/))

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

There are plenty of workarounds (in this case we should use --no-deps of course), but I thought it might be interesting nevertheless as it might reveal something more significant.

@uranusjr
Copy link
Member

Probably a variant of #8785

@rakekris

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@rakekris

This comment has been minimized.

@pfmoore

This comment has been minimized.

@rakekris

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@pfmoore

This comment has been minimized.

@rakekris

This comment has been minimized.

@uranusjr

This comment has been minimized.

sbidoul added a commit to acsone/acsoo that referenced this issue Dec 2, 2020
- Workaround  pypa/pip#9168
- --no-deps in editable install because the dep check has been done before
@coolacid
Copy link

Reporting same error:

requirements.txt:

twisted==20.3.0
treq==20.9.0

pip 20.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

Step 6/6 : RUN pip install /wheel/*.whl # --use-deprecated=legacy-resolver
 ---> Running in cb322fe6933b
Processing /wheel/Automat-20.2.0-py2.py3-none-any.whl
Processing /wheel/PyHamcrest-2.0.2-py3-none-any.whl
Processing /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl
Processing /wheel/attrs-20.3.0-py2.py3-none-any.whl
Processing /wheel/certifi-2020.12.5-py2.py3-none-any.whl
Processing /wheel/cffi-1.14.4-cp37-cp37m-manylinux1_x86_64.whl
Processing /wheel/chardet-3.0.4-py2.py3-none-any.whl
Processing /wheel/constantly-15.1.0-py2.py3-none-any.whl
Processing /wheel/cryptography-3.3.1-cp36-abi3-manylinux2010_x86_64.whl
Processing /wheel/hyperlink-20.0.1-py2.py3-none-any.whl
Processing /wheel/idna-2.10-py2.py3-none-any.whl
Processing /wheel/incremental-17.5.0-py2.py3-none-any.whl
Processing /wheel/pyOpenSSL-20.0.0-py2.py3-none-any.whl
Processing /wheel/pyasn1-0.4.8-py2.py3-none-any.whl
Processing /wheel/pyasn1_modules-0.2.8-py2.py3-none-any.whl
Processing /wheel/pycparser-2.20-py2.py3-none-any.whl
Processing /wheel/requests-2.25.0-py2.py3-none-any.whl
Processing /wheel/service_identity-18.1.0-py2.py3-none-any.whl
Processing /wheel/setuptools-51.0.0-py3-none-any.whl
Processing /wheel/six-1.15.0-py2.py3-none-any.whl
Processing /wheel/treq-20.9.0-py2.py3-none-any.whl
Processing /wheel/urllib3-1.26.2-py2.py3-none-any.whl
Processing /wheel/zope.interface-5.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Collecting Twisted[tls]>=18.7.0
  Downloading Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl (3.1 MB)
  Downloading Twisted-19.10.0-cp37-cp37m-manylinux1_x86_64.whl (3.1 MB)
  Downloading Twisted-19.7.0-cp37-cp37m-manylinux1_x86_64.whl (3.1 MB)
  Downloading Twisted-19.2.1.tar.bz2 (3.1 MB)
  Downloading Twisted-19.2.0.tar.bz2 (3.1 MB)
  Downloading Twisted-18.9.0.tar.bz2 (3.1 MB)
  Downloading Twisted-18.7.0.tar.bz2 (3.1 MB)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of zope-interface to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of urllib3 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of twisted to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of treq to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of setuptools to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of service-identity to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyopenssl to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyhamcrest to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pycparser to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyasn1-modules to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyasn1 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of incremental to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of hyperlink to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cryptography to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of constantly to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cffi to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of automat to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of attrs to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl), twisted[tls]==18.7.0, twisted[tls]==18.9.0, twisted[tls]==19.10.0, twisted[tls]==19.2.0, twisted[tls]==19.2.1, twisted[tls]==19.7.0 and twisted[tls]==20.3.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 20.3.0 depends on twisted 20.3.0 (from https://files.pythonhosted.org/packages/b8/f9/489416dda6de8ae6419356bf003c10d1ce6fb8377b6a3207b02b3a39c42a/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=894f6f3cfa57a15ea0d0714e4283913a5f2511dbd18653dd148eba53b3919797 (from https://pypi.org/simple/twisted/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*))
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 19.10.0 depends on twisted 19.10.0 (from https://files.pythonhosted.org/packages/06/28/2a433e147de68c8416aa0179c45e67b67161f5c0f24aaaf1723f6229f574/Twisted-19.10.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=611ef7696d406605962d9a7b040d357f3e91df20cf75c0b06e350947f541538b (from https://pypi.org/simple/twisted/))
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 19.7.0 depends on twisted 19.7.0 (from https://files.pythonhosted.org/packages/84/af/d15d3686e56c704796b23b67552f3ac78b84652793091a7d7ac8bf2887d7/Twisted-19.7.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=a5f2de00c6630c8f5ad32fca64fc4c853536c21e9ea8d0d2ae54804ef5836b9c (from https://pypi.org/simple/twisted/))
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 19.2.1 depends on twisted 19.2.1 (from https://files.pythonhosted.org/packages/79/59/035de19362320e632301ed7bbde23e4c8cd6fc5e2f1cf8d354cdba857854/Twisted-19.2.1.tar.bz2#sha256=fa2c04c2d68a9be7fc3975ba4947f653a57a656776f24be58ff0fe4b9aaf3e52 (from https://pypi.org/simple/twisted/))
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 19.2.0 depends on twisted 19.2.0 (from https://files.pythonhosted.org/packages/f8/2b/a80a70f71eb2b86992ffa5aaae41457791ae67faa70927fd16b76127c2b7/Twisted-19.2.0.tar.bz2#sha256=1708e1928ae84ec9d3ebab0d427e20e1e38ff721b15bbced476d047d4a43abbe (from https://pypi.org/simple/twisted/))
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 18.9.0 depends on twisted 18.9.0 (from https://files.pythonhosted.org/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2#sha256=294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395 (from https://pypi.org/simple/twisted/))
    The user requested twisted 20.3.0 (from /wheel/Twisted-20.3.0-cp37-cp37m-manylinux1_x86_64.whl)
    twisted[tls] 18.7.0 depends on twisted 18.7.0 (from https://files.pythonhosted.org/packages/90/50/4c315ce5d119f67189d1819629cae7908ca0b0a6c572980df5cc6942bc22/Twisted-18.7.0.tar.bz2#sha256=95ae985716e8107816d8d0df249d558dbaabb677987cc2ace45272c166b267e4 (from https://pypi.org/simple/twisted/))

treq has the following important requirements (to this issue):

            "Twisted[tls] >= 16.4.0 ; python_version < '3.7'",
            "Twisted[tls] >= 18.7.0 ; python_version >= '3.7'",

Twisted[tls] comes from Twisted @ 20.3.0 and version shows python 3.7.

Adding the --use-deprecated=legacy-resolver passes this error.

@uranusjr
Copy link
Member

This has been fixed in #9775 and available since 21.1.0.

@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
None yet
Projects
None yet
Development

No branches or pull requests

6 participants