Had the same issue with Fedora with Python 2.7. It turns out that additional packages are required:
sudo dnf install tk-devel tkinter
After installing the packages, this hi-world seems to work fine in Python 2.7:
$ cat hello.py from Tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() root.mainloop() $ python --version Python 2.7.8 $ python hello.py
And through the X11 forwarding, it looks like this:

Note that in Python 3, the module name has string values, and other packages may be needed ...
from tkinter import *
Stefan Saru Jan 12 '16 at 15:39 2016-01-12 15:39
source share