This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

When I import Tkinter, Python exits. Why?

lwickjr: Several possibilities suggest themselves:

* You don't have tk properly installed.

* Your version of Python doesn't have tk support enabled.

More information is needed:

* Are you importing tkinter from plain Python, or from I.D.L.E.?

* What else is going on when you try this?

Anyone have any other ideas?

I also have a similar problem.

Traceback (most recent call last):

ImportError: No module named TKinter

Check your spelling: it's Tkinter, not Tkinter. Python's a case-sensitive language.

I have just installed the Python executable on Win2K. Here is the info from the IDLE GUI: Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32.

I also installed the same version of Python on a Win98 system and I do not have this problem. TK inter was selected during the installation, so I assume it was installed, but I don't know how to confirm it.

Any help would be appresiciated.

lwickjr: Does I.D.L.E. work? If so, tk definitely was installed.


I'd go ask on the TkInter wiki. -- LionKimbro 2004-09-02 20:03:43


2026-02-14 16:14