Installing tkinter on ubuntu 14.04
I want to run python code on Ubuntu 14.04, but when I execute it, it gives me the following error message Traceback (most recent call last): File "main.py", line 2, in <module> from tkinter import * ImportError: No module named tkinter the_dude Try writing the following in the terminal: sudo apt-get install python-tk Don't forget to actually import Tkinter module at the beginning of your program: import Tkinter If you're using Python 3 then you must install as follows: sudo apt-get update sudo apt-get install python3-tk Tkinter for Python 2 ( python-tk ) is different from Python 3 's ( python3