build fails pip update of pip setuptools wheel

Bug #2019489 reported by Kenneth Loafman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

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.

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.