← Back to issue list

python plugin not working at all with snapcraft 9+

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2161192
Type
issue
State
open
Author
~t-a-k
Labels
—
Created
Updated
Closed
—

Current evaluation

Core26 Python plugin builds and module loading were fixed; packaging Python separately is now documented as required by the base.

Suggested action: close resolved

Reason: Commit 6ee41173c (snapcraft#6089) fixed core26 Python builds, while 35853fff8 (snapcraft#6437) changed core26 script shebangs to use the snap's venv interpreter so pyvenv.cfg exposes staged site-packages. Current documentation also states that core26 has no bundled Python and shows the required separate runtime part with a versioned python3.14-venv package.

Evaluated by: mr-cal-bot

Impact: 58 Quick Win: 23 Complexity: 42 Confidence: 97 Actionability: 67

Issue body

oHi, Python plugin for core26/snapcraft 9+ has been announced to be compatible with previous snapcraft.yaml's. https://forum.snapcraft.io/t/core26-bundled-python-changes/50178 But, * 'python3-venv' stage package is required instead of 'python3' * It does not load modules. Quickest workaround is to add the module directory to the snap runtime env: ``` environment: PYTHONPATH: $SNAP/lib/python3.13/site-packages:$PYTHONPATH # Temp fix as python-plugin does not work ; as using python runtime with venv modules ; does NOT prevent python-plugin mess with the python env of snapcraft build ``` https://forum.snapcraft.io/t/core26-bundled-python-changes/50178/26 Thanks.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 58
Quick Win: 23
Complexity: 42
Confidence: 97
Actionability: 67
close resolved Core26 Python plugin builds and module loading were fixed; packaging Python separately is now documented as required by the base.
stealth/space-bunny-alpha
Impact: 52
Quick Win: 12
Complexity: 47
Confidence: 82
Actionability: 44
needs triage Core26 Python builds reportedly need an explicit venv runtime and fail to find staged modules; PYTHONPATH works around imports, but the report has no reproducer or maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Impact: 65
Quick Win: 42
Staleness: 45
Complexity: 35
Confidence: 75
Support Request: 15
needs triage Python plugin broken on core26/snapcraft 9+ — modules not loading, requires python3-venv instead of python3. No maintainer response after 49 days.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 40
Confidence: 90
Support Request: 10
needs triage Reports Python plugin incompatibility with snapcraft 9+/core26, requiring python3-venv instead of python3 and failing to load modules. Currently unlabelled with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 40
Confidence: 95
Support Request: 20
needs triage Reports Python plugin incompatibility with snapcraft 9+ and core26, citing missing module loading and incorrect stage package requirements. Currently unlabelled and awaiting maintainer review.
qwen3.6-35b-a3b-mtp-q6
Staleness: 5
Complexity: 45
Confidence: 90
Support Request: 10
needs triage Reports Python plugin regression in snapcraft 9+/core26 where modules fail to load and requires 'python3-venv' instead of 'python3'. Unlabelled, no maintainer response yet.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#6437 (confidence 99%)

    Merged commit 35853fff8 uses the venv interpreter for core26 scripts so site-packages are discovered.

  • Likely Fixed By: snapcraft#6089 (confidence 96%)

    Merged commit 6ee41173c is explicitly titled as fixing Python plugin builds for core26.

Related issues

Issue Project State Summary Similarity
#1660 Python plugin fails on core26: base snap does not include Python interpreter craft-parts open core26 lacks a Python runtime, so Python-plugin builds fail unless Python is staged. Documentation covers the workaround, and maintainers are pursuing clearer warning guidance.
75%
#2161191 python plugin messing with snapcraft env snapcraft (launchpad) open Vague report that the Python plugin alters Snapcraft's own Python version/modules instead of isolating part deps in a venv; links a core26 forum thread. No labels, no maintainer response, zero comments, no reproducer.
75%
#1675479 python plugin doesn't work for namespace packages snapcraft (launchpad) open 2017 report that snapcraft's in-tree python plugin mishandled namespace packages (missing __init__.py / .pth) for Python 2.7 classic snaps; maintainer called it invalid, reporter's workaround was touch-ing __init__.py, no activity since 2017.
74%
#6020 Most Python-based snaps can't build on core26 snapcraft closed Fixed by merged PR #6089 (commit 6ee41173c) and released in Snapcraft 8.14.3, enabling Python plugin builds on core26.
74%
#1841861 Python plugins fails to build a snap when some parts depends on unpublished modules snapcraft (launchpad) closed Fixed by PR #2771 (commit 9bac0fd64), which made the Python plugin try processing setup.py before querying PyPI, allowing parts to use locally built packages.
72%
#786 Python plugin. Python is broken in core24 classic snaps if snap is used on an older Ubuntu LTS version craft-parts open Core24 classic snaps using the Python plugin fail on older Ubuntu LTS hosts because staged Python cannot find its stdlib; Snapcraft 8.3.2's fix proved incomplete, with follow-up in snapcraft#5144.
72%
#6089 fix(plugins/python): fix core26 builds snapcraft merged Merged #6089 fixed #6020 by enabling the Python plugin for strictly confined core26 snaps and adding spread tests; released in Snapcraft 8.14.3.
72%
#1874920 python plugin doesn't support base "core20" snapcraft (launchpad) closed Closed without a recorded fix after years of inactivity. Snapcraft 4.0 added core20 support, but i386 had no core20 base and external-symlink lint failures remained.
71%
#1794798 Update the python plugin to be base aware snapcraft (launchpad) closed Fixed by snapcraft PR #2362 (commit 669eebe19): the Python plugin gained core16/core18 base support and changed requirements from a string to a list.
70%
#1621540 do not compile with pip snapcraft (launchpad) closed Fixed in snapcore/snapcraft#779 (commit b9e1aabf6): the Python plugin now skips pip compilation of .pyc files, which were removed later anyway.
70%