Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 Samindu Oct 8 '13 at 16:05

1 Answer 1

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 Samindu 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 Samindu Oct 8 '13 at 16:07
3  
@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
1  
after i entered import tkinter it worked.THank you very much for your helps. –  Yomal Samindu Oct 9 '13 at 0:45

Your Answer

 
discard

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.