← Back to issue list

Snapcraft only includes lib/python*/site-packages in site

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1715406
Type
issue
State
closed
Author
~ev
Labels
—
Created
Updated
Closed

Current evaluation

Closed as stale in August 2026 after nearly nine years; no fix or replacement was identified.

Resolution: closed stale

Reason: The closing maintainer explicitly commented, "Closing as stale." No resolving PR, commit, or superseding work was identified.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Debugging why `import google.protobuf` wasn't working inside a snap, I found that snapcraft only puts $SNAP/lib/python*/site-packages into site.addsitedir(). As I was using pip inside a scriptlet without additional environment variables or command line parameters, it was installing the modules to $SNAP/usr/lib/python*/site-packages. This meant that python was looking in the wrong place for protobuf-3.4.0-py2.7-nspkg.pth. Can we include $SNAP/usr/lib in a list fed to site.addsitedir()?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed as stale in August 2026 after nearly nine years; no fix or replacement was identified.
stealth/space-bunny-alpha — closed stale Closed as stale in snapcraft#1715406; the request to add $SNAP/usr/lib to Python’s site.addsitedir() search path was abandoned and never implemented.
qwen/qwen3.6-35b-a3b — — Requesting Snapcraft to add $SNAP/usr/lib/python*/site-packages to site.addsitedir() was closed as stale due to inactivity. The enhancement was abandoned and never implemented.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 90
Support Request: 10
close stale Request to include $SNAP/usr/lib in Python's site.addsitedir() paths. Unlabelled, zero comments, inactive for over 8 years, and likely irrelevant to modern snapcraft versions.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Snapcraft omits $SNAP/usr/lib/python*/site-packages from site.addsitedir(), breaking Python imports. Unlabeled, zero maintainer comments, and inactive for nearly eight years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 15
close stale Snapcraft only adds lib/python*/site-packages to Python's site path, causing pip-installed modules in usr/lib to fail. Unlabeled, zero comments, inactive for over 7 years.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1734231 SnapcraftEnvironmentError is too generic snapcraft (launchpad) closed Closed as stale after 3,235 days without an implementation; maintainer ~mr-cal closed it on 2026-08-14 with no linked fix.
71%
#4300 snapcraft fails for python projects if there is no setup.py snapcraft closed Closed as stale in April 2025 without a Snapcraft fix. The reproducer declared bin/cos-alerter, but its packaging metadata did not define a console script; no resolving PR or commit was linked.
70%