python plugin "No module named site"
Metadata
Current evaluation
Fixed by snapcraft PR #858 (commit a2054b8a7), which made the Python plugin compatible with bzr-backed requirements.
Resolution: closed resolved
Reason: Commit a2054b8a7, titled "python plugin: allow usage of bzr" and associated with PR #858, directly addresses the reported bzr failure while processing requirements.txt.
Evaluated by: mr-cal-bot
No scores available.
Issue body
With the new python plugin I can no longer build my MAAS snap. The issue is that in my requirements.txt file I use bzr to grab some dependencies. This worked fine with the python3 plugin, but I think some of the environment variable you are setting are causing this issue. What is wierd is that site is a core python module, its very strange for it to be missing.
Collecting curtin from bzr+lp:curtin#egg=curtin (from -r /home/blake/Code/maas/maas-snap-early/parts/maas/src/requirements.txt (line 29))
Checking out lp:curtin to /tmp/pip-build-ihsfwbyx/curtin
ImportError: No module named site
Command "bzr branch -q lp:curtin /tmp/pip-build-ihsfwbyx/curtin" failed with error code 1 in None
Command '['/bin/sh', '/tmp/tmp27a9nbp2', 'pip', 'download', '--disable-pip-version-check', '--dest', '/home/blake/Code/maas/maas-snap-early/parts/maas/packages', '--requirement', '/home/blake/Code/maas/maas-snap-early/parts/maas/src/requirements.txt']' returned non-zero exit status 1
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcraft PR #858 (commit a2054b8a7), which made the Python plugin compatible with bzr-backed requirements. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged snapcraft#858 (a2054b8a7): the Python plugin can now use bzr sources, resolving the missing-site failure during dependency downloads. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #858 (commit a2054b8a7), allowing the Python plugin to use bzr and resolve the missing-site build failure. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The python plugin triggered a missing site module error during snap builds when fetching bzr dependencies, but no fix or follow-up was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Python plugin environment variables caused a missing site module error during snap builds. The report was closed without comments or resolution, indicating abandonment. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments or resolution. The python plugin environment variable conflict causing a missing core module error was likely abandoned or superseded by plugin updates. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Python plugin environment variables triggered a missing site module error during snap builds. The report was closed without comments or resolution, indicating abandonment after over nine years of inactivity. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft#858
(confidence 99%)
The commit explicitly enables bzr usage in the Python plugin that failed for the reporter.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2901 python plugin: do not leak snapcraft's site-packages | snapcraft | merged | Merged #2901 fixed Python plugin builds leaking Snapcraft's $SNAP/site-packages by conditioning that path on SNAPCRAFT_INTERPRETER (commit c13c79d76). | |
| #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. |