Snap build started failing with pip not working

This past weekend it appears that fwupd snap builds have stopped working properly.

The failure shows up when trying to build meson.

Pulling meson 
Downloading 'meson-0.47.2.tar.gz'[] 100%

Failed to run '/root/project/parts/meson/install/usr/bin/python3 -m pip': Exited with code -11.

Manually running that command I get this:

/build/parts/meson/install/usr/bin/python3 -m pip
/build/parts/meson/install/usr/bin/python3: No module named pip

This is the part in snapcraft.yaml for meson.

    plugin: python
      - ninja-build
      - -bin
      - -etc
      - -lib
      - -share
      - -usr

It hasn’t changed for about 4 months:

Something I should note is this seems like it was specifically occurring in the docker container snapcore/snapcraft based build that runs on CircleCI. I can reproduce that same failure locally in a docker container too.

However it seems to work fine on the Canonical Launchpad builder run at about the same time.

Downloading 'meson-0.47.2.tar.gz'   0%                                         
[25/Feb/2019:09:50:10 +0000] "CONNECT HTTP/1.0" 200 1276050 "-" "-"
[25/Feb/2019:09:50:10 +0000] "CONNECT HTTP/1.0" 200 6850 "-" "-"
Fetching and installing pip...
Collecting pip
[25/Feb/2019:09:50:11 +0000] "CONNECT HTTP/1.0" 200 4794 "-" "-"
  Downloading (1.4MB)
  Saved ./parts/meson/python-packages/pip-19.0.3-py2.py3-none-any.whl
Successfully downloaded pip
[25/Feb/2019:09:50:12 +0000] "CONNECT HTTP/1.0" 200 1362069 "-" "-"
[25/Feb/2019:09:50:12 +0000] "CONNECT HTTP/1.0" 200 15864 "-" "-"
Ignoring indexes:
Collecting pip
Installing collected packages: pip
Successfully installed pip-8.1.1
[25/Feb/2019:09:50:15 +0000] "CONNECT HTTP/1.0" 200 4569 "-" "-"
Fetching and installing wheel...
Collecting wheel
  Saved ./parts/meson/python-packages/wheel-0.33.1-py2.py3-none-any.whl
Successfully downloaded wheel
[25/Feb/2019:09:50:15 +0000] "CONNECT HTTP/1.0" 200 13124 "-" "-"
[25/Feb/2019:09:50:15 +0000] "CONNECT HTTP/1.0" 200 27527 "-" "-"
Looking in links: /build/fwupd/parts/meson/python-packages
Collecting wheel
Installing collected packages: wheel
Successfully installed wheel-0.33.1
Fetching and installing setuptools...
Collecting setuptools
  Downloading (575kB)
  Saved ./parts/meson/python-packages/setuptools-40.8.0-py2.py3-none-any.whl
Successfully downloaded setuptools
[25/Feb/2019:09:50:18 +0000] "CONNECT HTTP/1.0" 200 90429 "-" "-"
[25/Feb/2019:09:50:18 +0000] "CONNECT HTTP/1.0" 200 582561 "-" "-"
Looking in links: /build/fwupd/parts/meson/python-packages
Collecting setuptools
Installing collected packages: setuptools
Successfully installed setuptools-40.8.0
Processing /build/fwupd/parts/meson/src
  Link is a directory, ignoring download_dir
Successfully downloaded meson

Hi, this is being tracked on LP: #1817300.
It only affects snaps using classic confinement, fix should be available everywhere in the coming days, this is where it currently works:

  • snapcraft from edge
  • launchpad/

There was a bootstrapping issue as this affected snapcraft from building itself as well.
You can try and see if the fix works for docker by creating an image using edge.Dockerfile by following the documentation on

Here’s some form of explanation for the issue PSA: classic confinement and core snapcraft issue

1 Like

Thanks for explaining it. For now I’ve switched the CI for fwupd over to edge ( When the fix is ready I’m guessing that LP bug will indicate so and I’ll switch back to stable.