snapcraft `8.0.2`+ python plugin classic core22 snap ModuleNotFoundError
Metadata
Current evaluation
No fix shipped for the classic core22 Python PATH/import regression. Closed after inactivity, with #4187 and PATH-removal PR #4216 (9b6e5833) identified as the likely cause.
Resolution: closed stale
Reason: No resolving PR or commit was recorded. The maintainer linked the failure to classic-snap PATH removal from #4187, implemented by #4216 at 9b6e5833, and the report was later closed without a fix.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
We maintain a private snap where we build a classic snap
This is not an issue with using snapcraft `7.5.4`. To unblock ourselves we have pinned to `7.5.4`.
### To Reproduce
Build a classic snap with core22 as a base using `plugin: python`. Try and run any of the snap apps.
### Environment
Snapcraft is being with default config and being run with `snapcraft --enable-manifest`
### snapcraft.yaml
```shell
name: REDACTED
summary: REDACTED
description: REDACTED
base: core22
grade: devel
confinement: classic
adopt-info: REDACTED
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
parts:
REDACTED:
plugin: python
source: .
source-type: git
build-attributes:
- enable-patchelf
build-packages:
- git
- python3
- libapt-pkg-dev
- gcc
- g++
- dpkg-dev
stage-packages:
- libpython3.10-minimal
- libpython3.10-stdlib
- python3.10-minimal
- python3.10-venv
override-pull: |
craftctl default
DATE="$(date +%Y.%m.%d)"
GIT="$(git rev-parse --short HEAD)"
craftctl set version="${DATE}+git${GIT}"
apps:
REDACTED:
command: bin/REDACTED
```
### Relevant log output
```shell
from REDACTED.generate import generate_REDACTED
ModuleNotFoundError: No module named 'REDACTED'
```
### Additional context
Apologies for the `REDACTED` references but this is a private project.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | No fix shipped for the classic core22 Python PATH/import regression. Closed after inactivity, with #4187 and PATH-removal PR #4216 (9b6e5833) identified as the likely cause. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a confirmed fix: Snapcraft 8.0.2+ omitted PATH from classic Python snaps, and #4187 was identified as the likely cause. | |
| stealth/space-bunny-alpha | — | closed stale | No code fix shipped: the classic Python snap PATH regression remained unresolved after a workaround failed, and the report was closed with #4187 cited as the likely cause. | |
| stealth/space-bunny-alpha | — | closed stale | Snapcraft 8.0.2+ dropped PATH handling for classic snaps, causing Python plugin apps to fail. No code fix was merged; CRAFT-2550 tracked the report. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a documented public fix; invoking bin/python3 with the snap script worked around the missing PATH. #4187 was identified as the likely cause. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. No code fix was merged. A workaround was identified for Snapcraft 8 dropping PATH settings in classic snaps. An internal ticket was created for tracking. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a fix. Snapcraft 8 removed the PATH variable for classic snaps, triggering ModuleNotFoundError. The issue persists; users must explicitly invoke python or pin to 7.5.4 as a workaround. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The reporter confirmed the ModuleNotFoundError persists in snapcraft 8.0.3 after mistaking a virtual environment for a fix. The bug likely stems from removing PATH variables for classic snaps in version 8. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. No fix was merged; the issue stems from snapcraft 8 dropping the PATH variable for classic snaps. A workaround was confirmed: explicitly invoke python in the app command. The reporter verified it but could not consistently reproduce the error. |
Update history
No update history recorded yet.
Related work
-
Caused By:
canonical/snapcraft#4216
(confidence 95%)
Merged as commit 9b6e5833; it omitted top-level PATH and LD_LIBRARY_PATH for classic-confinement snaps.
-
Caused By:
canonical/snapcraft#4187
(confidence 90%)
The maintainer suspected this change, which omitted PATH for classic snaps, caused the Python import failure.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5407 Unable to build Python snaps using classic confinement with core24 using snapcraft 8.8.0 (8.x/stable) | snapcraft | closed | Resolved as a configuration issue: staging python3.12-minimal and invoking bin/python made the core24 classic Python snap build work; no fixing PR or commit was cited. |