Tkinter is a bridge that connects programmers with tk which is written in python. Tk provides all the graphical widgets, so that it enables us to develop GUI applications. In other words, tkinter is a portable GUI toolkit for python. If you had just migrated from python2 to python3, you might faced some problems when importing tkinter.
Install tkinter for Python3
In python2, we usually install
tkinter package and it can immediately imported. But we can not do that in python3. So, install
python3-tkinter package to be able to import tkinter.
Check your tkinter support
Enter an interactive python interpreter in your favorite shell/ terminal.
If this works, it should pop up a small window with two buttons (Click me! and QUIT buttons) and you’re all set. Congratulations!