Hi Everyone,
I am a novice developer and I am currently developing a python tkinter snap which which displays number on the tkinter window using core18 as base. I referred to the below topic on the forum and the window appeared as expected for core 18 as base on Ubuntu 18.04:
Tkinter doesn’t work with the python plugin
When I try to change the base to core20 , the snap builds and installs without any errors on my Ubuntu 20.04 machine. When I try to run the application, I get the following error:
ModuleNotFoundError: No module named 'tkinter'
The snapcraft.yaml file is as follows:
name: tkinter-demoapp
version: '1.0'
summary: DemoApp
description: |
Demo tkinter app example.
confinement: devmode
base: core20
grade: devel # must be 'stable' to release into candidate/stable channels
parts:
card-uid:
plugin: python
source: demo-app/
stage-packages: [python3-tk]
debian-multiarch-triplet-provider-launch:
plugin: nil
stage-snaps:
- debian-multiarch-triplet-provider-launch
tcltk-launch:
plugin: nil
stage-snaps:
- tcltk-launch
apps:
card-uid:
command: bin/popup
command-chain:
- bin/debian-multiarch-triplet-provider-launch
- bin/tcltk-launch
plugs:
- desktop
- home
- unity7
- wayland
- x11
# Needed by Mir and/or Xwayland
layout:
/usr/share/X11:
bind: $SNAP/usr/share/X11
/usr/bin/xkbcomp:
symlink: $SNAP/usr/bin/xkbcomp
/usr/share/icons:
bind: $SNAP/usr/share/icons
/usr/share/fonts:
bind: $SNAP/usr/share/fonts
/etc/fonts:
bind: $SNAP/etc/fonts
The snap is available at : https://github.com/therealdanish/Tkinter-Snap.git
Any workarounds or suggestions?