-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
- pip version: 20.3.1
- Python version: Python 3.8.5
- Operating system: Windows 10 or Ubuntu
We switched today from pip 20.2.2 to 20.3.1 and suddenly in a big project with a very long dependency list (over 60 packages), pip does not manage anymore to install the dependencies from the requirements.txt
file. It always tries to install hundreds of different package versions from the same package. Sometimes, it just tries out 3 or 10 versions, which takes some time but works in the end, but sometimes, it downloads and installs all possible versions it can find.
Here this is what happens with the package requests
:
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
Collecting requests Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whl Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl Downloading requests-2.22.0-py2.py3-none-any.whl (57 kB)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Downloading requests-2.21.0-py2.py3-none-any.whl (57 kB)
Downloading requests-2.20.1-py2.py3-none-any.whl (57 kB)
Downloading requests-2.20.0-py2.py3-none-any.whl (60 kB)
Downloading requests-2.19.1-py2.py3-none-any.whl (91 kB)
Downloading requests-2.19.0-py2.py3-none-any.whl (91 kB)
Downloading requests-2.18.4-py2.py3-none-any.whl (88 kB)
Downloading requests-2.18.3-py2.py3-none-any.whl (88 kB)
Downloading requests-2.18.2-py2.py3-none-any.whl (88 kB)
Downloading requests-2.18.1-py2.py3-none-any.whl (88 kB)
Downloading requests-2.18.0-py2.py3-none-any.whl (563 kB)
Downloading requests-2.17.3-py2.py3-none-any.whl (87 kB)
Downloading requests-2.17.2-py2.py3-none-any.whl (87 kB)
Downloading requests-2.17.1-py2.py3-none-any.whl (87 kB)
Downloading requests-2.17.0-py2.py3-none-any.whl (87 kB)
Downloading requests-2.16.5-py2.py3-none-any.whl (87 kB)
Downloading requests-2.16.4-py2.py3-none-any.whl (87 kB)
Downloading requests-2.16.3-py2.py3-none-any.whl (86 kB)
Downloading requests-2.16.2-py2.py3-none-any.whl (86 kB)
Downloading requests-2.16.1-py2.py3-none-any.whl (85 kB)
Downloading requests-2.16.0-py2.py3-none-any.whl (85 kB)
Downloading requests-2.15.1-py2.py3-none-any.whl (558 kB)
Downloading requests-2.14.2-py2.py3-none-any.whl (560 kB)
Downloading requests-2.14.1-py2.py3-none-any.whl (559 kB)
Downloading requests-2.14.0-py2.py3-none-any.whl (559 kB)
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
Downloading requests-2.13.0-py2.py3-none-any.whl (584 kB)
Downloading requests-2.12.5-py2.py3-none-any.whl (576 kB)
Downloading requests-2.12.4-py2.py3-none-any.whl (576 kB)
Downloading requests-2.12.3-py2.py3-none-any.whl (575 kB)
Downloading requests-2.12.2-py2.py3-none-any.whl (575 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
Downloading requests-2.12.1-py2.py3-none-any.whl (574 kB)
Downloading requests-2.12.0-py2.py3-none-any.whl (574 kB)
Downloading requests-2.11.1-py2.py3-none-any.whl (514 kB)
Downloading requests-2.11.0-py2.py3-none-any.whl (514 kB)
Downloading requests-2.10.0-py2.py3-none-any.whl (506 kB)
Downloading requests-2.9.2-py2.py3-none-any.whl (502 kB)
Downloading requests-2.9.1-py2.py3-none-any.whl (501 kB)
Downloading requests-2.9.0-py2.py3-none-any.whl (500 kB)
Downloading requests-2.8.1-py2.py3-none-any.whl (497 kB)
Downloading requests-2.8.0-py2.py3-none-any.whl (476 kB)
Downloading requests-2.7.0-py2.py3-none-any.whl (470 kB)
Downloading requests-2.6.2-py2.py3-none-any.whl (470 kB)
Downloading requests-2.6.1-py2.py3-none-any.whl (469 kB)
Downloading requests-2.6.0-py2.py3-none-any.whl (469 kB)
Downloading requests-2.5.3-py2.py3-none-any.whl (468 kB)
Downloading requests-2.5.2-py2.py3-none-any.whl (474 kB)
Downloading requests-2.5.1-py2.py3-none-any.whl (464 kB)
Downloading requests-2.5.0-py2.py3-none-any.whl (464 kB)
Downloading requests-2.4.3-py2.py3-none-any.whl (459 kB)
Downloading requests-2.4.2-py2.py3-none-any.whl (459 kB)
Downloading requests-2.4.1-py2.py3-none-any.whl (458 kB)
Downloading requests-2.4.0-py2.py3-none-any.whl (457 kB)
Downloading requests-2.3.0-py2.py3-none-any.whl (452 kB)
Downloading requests-2.2.1-py2.py3-none-any.whl (625 kB)
Downloading requests-2.2.0-py2.py3-none-any.whl (623 kB)
Downloading requests-2.1.0-py2.py3-none-any.whl (445 kB)
Downloading requests-2.0.1-py2.py3-none-any.whl (439 kB)
Downloading requests-2.0.0-py2.py3-none-any.whl (391 kB)
Downloading requests-1.2.3.tar.gz (348 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
Downloading requests-1.2.2.tar.gz (348 kB)
Downloading requests-1.2.1.tar.gz (348 kB)
Downloading requests-1.2.0.tar.gz (341 kB)
Downloading requests-1.1.0.tar.gz (337 kB)
Downloading requests-1.0.4.tar.gz (336 kB)
Downloading requests-1.0.3.tar.gz (335 kB)
Downloading requests-1.0.2.tar.gz (335 kB)
Downloading requests-1.0.1.tar.gz (335 kB)
Downloading requests-1.0.0.tar.gz (335 kB)
Downloading requests-0.14.2.tar.gz (361 kB)
ERROR: Command errored out with exit status 1:
command: /opt/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-t94ak9d1 cwd: /tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/setup.py", line 6, in <module>
import requests
File "/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/requests/__init__.py", line 52, in <module>
from . import utils
File "/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/requests/utils.py", line 22, in <module>
from .compat import parse_http_list as _parse_list_header
File "/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/requests/compat.py", line 112, in <module>
from .packages import chardet2 as chardet
ImportError: cannot import name 'chardet2' from 'requests.packages' (/tmp/pip-install-ilzlnu9j/requests_17e83d46f96d481997d94d444ebabe71/requests/packages/__init__.py)
----------------------------------------
While I understand, that this is coming from the new resolver and a potential compatibility conflict with a certain package, I don't understand what is the exact issue here. We don't use requests
directly, but it seems that this a dependency from a dependency we have. So we are not directly in control of this. And pip does not give me any help to understand, which packages have a version restriction, which lead to this behavior.
My suggestion is here to provide a better debug output for developers. When pip has to try out different version, it should tell why it must do so. For example:
Check package "requests-2.24.0-py2.py3-none-any.whl", but it can not be used, because package "<any package>" restricts the version to X and "<another package>" requests version Y. We try out an older version.
...
This would help me to understand where to begin with fixing those conflicts. At the moment I'm absolutely lost and have to switch back to pip 20.2.2.