Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
I have already installed python3-tk.But the same error comes – Yomal Amarathunge Oct 8 '13 at 16:05
up vote 3 down vote accepted

You need to install the package python3-tk.

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

share|improve this answer
But i have already installed it?. i can't understand – Yomal Amarathunge Oct 8 '13 at 16:03
@YomalSamindu: Are you sure you are using Python3? For Python2 you need python-tk instead. – Florian Diesch Oct 8 '13 at 16:05
yes i am pretty sure. its python 3.2 – Yomal Amarathunge Oct 8 '13 at 16:07
@YomalSamindu As a note, alot of capitalization has changed in tkinter between python2 and python3. Check your capitals first for any future problems – dan08 Oct 8 '13 at 16:25
after i entered import tkinter it worked.THank you very much for your helps. – Yomal Amarathunge Oct 9 '13 at 0:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.