Python3 – Fix Unable to Import Tkinter on Ubuntu 12.04

12.04python3

I am studying Python and tried to make GUI using python.I am using IDLE 3.2 on 12.04 Ubuntu.When i typed import Tkinter, a error comes, it says following:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import Tkinter
ImportError: No module named Tkinter

Any ideas on what's going wrong and how I can resolve this?

Best Answer

You need to install the package python3-tk.

And in Python3 the module is called tkinter instead of Tkinter.

Related Question