ImportError in pip wrappers after upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charmed Kubernetes Testing |
Fix Released
|
Low
|
Adam Dyess |
Bug Description
The K8s-suite pins down a pip version to use in the virtualenv for tox tests as [22.0.4](https:/
The proposed solution is to either:
a) unpin the initial tox dependency on pip==22.0.4, or
b) properly pin down pip on the `requirements.txt` so that the subsequent call to `pip-sync` won't attempt to auto-upgrade.
Error seen in the following runs:
1) https:/
Logs: https:/
Jenkins logs: https:/
2) https:/
Logs: https:/
Jenkins logs: https:/
adding the output from pip
2022-12-02-05:55:11 root ERROR [localhost] STDOUT follows: k8s-validation/ .tox/py3 0.9.0,click= =8.1.3, packaging= =21.3,pep517= =0.13.0, pip-tools= =6.11.0, pkg_resources= =0.0.0, pyparsing= =3.0.9, tomli== 2.0.1 '3359271779' 15.1-cp38- cp38-manylinux_ 2_17_x86_ 64.manylinux201 4_x86_64. whl (442 kB) ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━ 442.7/442.7 KB 1.1 MB/s eta 0:00:00 6.0.0-py2. py3-none- any.whl (57 kB) ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━ 57.8/57.8 KB 592.0 kB/s eta 0:00:00 2.21-py2. py3-none- any.whl (118 kB) ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━ 118.7/118.7 KB 1.3 MB/s eta 0:00:00 0.8.0,> =0.7.0 0.7.0-py2. py3-none- any.whl (7.3 kB) 2.11.0, >=2.10. 0 2.10.0- py2.py3- none-any. whl (41 kB) ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━ 41.3/41.3 KB 16.4 MB/s eta 0:00:00 3.1.0,> =3.0.0 3.0.1-py2. py3-none- any.whl (62 kB) ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━━━━━ ━━━ 62.8/62.8 KB 7.8 MB/s eta 0:00:00 ubuntu/ k8s-validation/ .tox/py3/ bin/python -m pip install --upgrade pip' command. k8s-validation/ requirements. txt ubuntu/ k8s-validation/ .tox/py3/ bin/pip- sync", line 5, in <module> scripts. sync import cli ubuntu/ k8s-validation/ .tox/py3/ lib/python3. 8/site- packages/ piptools/ scripts/ sync.py" , line 16, in <module> ubuntu/ k8s-validation/ .tox/py3/ lib/python3. 8/site- packages/ piptools/ sync.py" , line 15, in <module> ubuntu/ k8s-validation/ .tox/py3/ lib/python3. 8/site- packages/ piptools/ _compat/ __init_ _.py", line 3, in <module> ubuntu/ k8s-validation/ .tox/py3/ lib/python3. 8/site- packages/ piptools/ _compat/ pip_compat. py", line 52, in <module> pkg_resources = _uses_pkg_ resources( ) ubuntu/ k8s-validation/ .tox/py3/ lib/python3. 8/site- packages/ piptools/ _compat/ pip_compat. py", line 46, in _uses_pkg_resources metadata import select_backend metadata' (/home/ ubuntu/ k8s-validation/ .tox/py3/ lib/python3. 8/site- packages/ pip/_internal/ metadata/ __init_ _.py) k8s-validation/ .tox/py3/ bin/pip- sync requirements.txt (exited with code 1)
py3 create: /home/ubuntu/
py3 installdeps: pip == 22.0.4, pip-tools
py3 installed: build==
py3 run-test-pre: PYTHONHASHSEED=
py3 run-test: commands[0] | pip install cffi flake8
Collecting cffi
Downloading cffi-1.
━━
Collecting flake8
Downloading flake8-
━━
Collecting pycparser
Downloading pycparser-
━━
Collecting mccabe<
Downloading mccabe-
Collecting pycodestyle<
Downloading pycodestyle-
━━
Collecting pyflakes<
Downloading pyflakes-
━━
Installing collected packages: pyflakes, pycparser, pycodestyle, mccabe, flake8, cffi
Successfully installed cffi-1.15.1 flake8-6.0.0 mccabe-0.7.0 pycodestyle-2.10.0 pycparser-2.21 pyflakes-3.0.1
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/
py3 run-test: commands[1] | pip-sync /home/ubuntu/
Traceback (most recent call last):
File "/home/
from piptools.
File "/home/
from .. import sync
File "/home/
from ._compat.pip_compat import Distribution, dist_requires
File "/home/
from .pip_compat import PIP_VERSION, parse_requirements
File "/home/
uses_
File "/home/
from pip._internal.
ImportError: cannot import name 'select_backend' from 'pip._internal.
ERROR: InvocationError for command /home/ubuntu/