← Back to issue list

build fails pip update of pip setuptools wheel

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2019489
Type
issue
State
open
Author
~kenneth-loafman
Labels
—
Created
Updated
Closed
—

Current evaluation

Python-part builds can fail after automatically upgrading pip, setuptools, and wheel because system pkg_resources requires the old pip; the report remains open and untriaged.

Suggested action: needs triage

Reason: The report contains a clear failure sequence: the upgrade to pip 23.1.2 succeeds, then pkg_resources aborts the requirements install by requiring pip 20.0.2. The current Python plugin still defaults to upgrading these three packages before requirements, but the supplied context lacks the attached reproducer, base/version details, and maintainer assessment needed to distinguish a Snapcraft environment bug from an expected requirements conflict.

Evaluated by: mr-cal-bot

Impact: 43 Quick Win: 12 Complexity: 56 Confidence: 80 Actionability: 64

Issue body

Full log and script attached, however, here is the relevant part: + snapcraftctl build + python3 -m venv /home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install + SNAPCRAFT_PYTHON_VENV_INTERP_PATH=/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/bin/python3 + pip install -U pip setuptools wheel Collecting pip Using cached pip-23.1.2-py3-none-any.whl (2.1 MB) Collecting setuptools Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB) Collecting wheel Using cached wheel-0.40.0-py3-none-any.whl (64 kB) Installing collected packages: pip, setuptools, wheel Attempting uninstall: pip Found existing installation: pip 20.0.2 Uninstalling pip-20.0.2: Successfully uninstalled pip-20.0.2 Attempting uninstall: setuptools Found existing installation: setuptools 45.2.0 Uninstalling setuptools-45.2.0: Successfully uninstalled setuptools-45.2.0 Attempting uninstall: wheel Found existing installation: wheel 0.34.2 Uninstalling wheel-0.34.2: Successfully uninstalled wheel-0.34.2 Successfully installed pip-23.1.2 setuptools-67.7.2 wheel-0.40.0 + pip install -U -r requirements.txt Traceback (most recent call last): File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 629, in _build_master ws.require(__requires__) File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 966, in require needed = self.resolve(parse_requirements(requirements)) File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 827, in resolve dist = self._resolve_dist( File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 873, in _resolve_dist raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.VersionConflict: (pip 23.1.2 (/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages), Requirement.parse('pip==20.0.2')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/usr/bin/pip", line 6, in <module> from pkg_resources import load_entry_point File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3327, in <module> def _initialize_master_working_set(): File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3301, in _call_aside f(*args, **kwargs) File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3339, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 631, in _build_master return cls._build_from_requirements(__requires__) File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 644, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 827, in resolve dist = self._resolve_dist( File "/home/ken/workspace/duplicity-main/build/duplicity-1.2.4.dev2/parts/duplicity/install/lib/python3.8/site-packages/pkg_resources/__init__.py", line 868, in _resolve_dist raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pip==20.0.2' distribution was not found and is required by the application Failed to build 'duplicity'. It tries to upgrade to the newest version in the venv, then fails because pkg-resources installed from apt wants the ancient version it uses.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 43
Quick Win: 12
Complexity: 56
Confidence: 80
Actionability: 64
needs triage Python-part builds can fail after automatically upgrading pip, setuptools, and wheel because system pkg_resources requires the old pip; the report remains open and untriaged.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 6
Complexity: 55
Confidence: 68
Actionability: 45
needs triage External contributor reports core20 python-plugin venv builds fail when the plugin runs `pip install -U pip setuptools wheel`: the base snap's Debian-patched pip (pinned pip==20.0.2) then raises pkg_resources DistributionNotFound. Full log attached, untriaged, no maintainer response.
stealth/space-bunny-alpha
Impact: 50
Quick Win: 20
Complexity: 40
Confidence: 88
Actionability: 65
needs triage Python venv builds fail after upgrading pip to 23.1.2 because host pkg_resources metadata requires pip 20.0.2. The report remains untriaged and unanswered.
qwen3.6-35b-a3b-mtp-q6
Impact: 30
Quick Win: 18
Staleness: 95
Complexity: 40
Confidence: 75
Support Request: 20
close stale Build fails when pip upgrade in venv breaks pkg_resources version resolution. Untriaged, 1209 days old, no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 20
needs triage Build fails when upgrading pip in a venv due to a version conflict with system pkg_resources expecting an older version. Untriaged with no maintainer response or comments.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 20
close stale Build fails due to pip version conflict in venv. Upgraded pip 23.1.2 conflicts with pkg_resources requiring pip 20.0.2. Issue is over 3 years old with no activity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 20
close stale Build fails when upgrading pip in a Snapcraft venv due to a pkg_resources conflict with an outdated pip version pinned in requirements. Untriaged and inactive for over 3 years.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.