Search notes:

Python standard library: tkinter

tkinter allows to use the Tcl/Tk GUI toolkit from Python.
Installing tkinter was especially helpful to me when using matplotlib and/or pyplot when I had the warning Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure..

Installing tkinter

Because tkinter relies on the Tcl/Tk toolkit, tkinter might not be installed together with a default Python installation, even though tkinter belongs to Python's standard library.
This Stackoverflow answer and its comments suggest to install tkinter with something along the lines of:
Apt based distros (Ubuntu, Debian) sudo apt install -y python3-tk
Fedora sudo dnf install python3-tkinter
macOS brew install python-tk

Checking if tkinter is properly installed

$ python3 -m tkinter

See also

wxPython

Index