-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python plugin. Python is broken in core24 classic snaps if snap is used on an older Ubuntu LTS version #786
Comments
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. |
Here is an example of python3.12-based snap working on 18.04, 20.04 and 24.04
|
What'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
The text was updated successfully, but these errors were encountered: