Open NucciTheBoss opened 3 months ago
Thanks for the report. It's probably something that we'll need to fix in Snapcraft itself as it's very specific to how snaps are laid out. Cross-posting a possible fix: @NucciTheBoss can you try this fix and report back?
Here is an example of python3.12-based snap working on 18.04, 20.04 and 24.04
imagecraft --help
commandWhat's the shebang on that hook? I'm wondering if it's pointing to the system Python rather than the staged python
I'm having the same issue here trying to update the Landscape-client snap to a Core24 base and then installing to a 24.04 instance. Also, the link from @upils is now dead so I can't attempt that one.
The initial issue was a the configure script being unable to find its own modules. This was fixed by setting PYTHONHOME to $SNAP but that now leads to exactly the same log output as @NucciTheBoss.
The original issue was (supposedly) fixed in Snapcraft 8.3.2, can you open a new issue in Snapcraft with details on the snap and the error log?
Done.
Bug Description
Python is broken in core24 classic snaps when the snap is installed on an older Ubuntu base. The embedded Python interpreter in the squashfs archive borks when you try to invoke a Python script. Rather than running the script, Python will throw platform related errors such as not finding the
encodings
module.The Python interpreter will work properly if using the core24 classic snap on Ubuntu 24.04 LTS, but will fail if you use the classic snap on an older LTS release such as 22.04 or 20.04.
Related issues and threads
To Reproduce
For the Slurm snap, I have already reverted back to core22 for the time being, however, there was time when we were publishing core24-base Slurm snaps with this issue. Use the following commands to reproduce the issue:
part yaml
Relevant log output