Sunday, January 23, 2011

Python 3: Problem with Tkinter Tutorial

I was searching GUI toolkit for Python 3.1.3, and I came across this hello world example (for Python 2) which utilize Tkinter. The code looks simple enough, so I gave it a try but got the following error:
Traceback (most recent call last):
  File "C:\", line 1, in module
    from Tkinter import *
ImportError: No module named Tkinter

Simply change the module name to "tkinter" (lower case) instead.

Problems with Python 3 and Tkinter

1 comment:

Anonymous said...

Thanks. This was helpful to me.