Subject: Python and Tk?
To: None <tech-pkg@netbsd.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-pkg
Date: 11/04/2005 10:19:21
I'm trying to use Python's Tk interface, but I get this error:

Traceback (most recent call last):
  File "./run", line 4, in ?
    from Tkinter import *
  File "/usr/pkg/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

I have Python 2.4 and tk 8.4.11nb1, both installed from pkgsrc.  The 
Python README says that Tk support is automatically included if Tk is 
detected at build time; I rebuilt Python to be sure, but it didn't help.

		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb