Subject: Re: Python and Tk?
To: Steven M.Bellovin <smb@cs.columbia.edu>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 11/04/2005 07:52:52
On Nov 4, 2005, at 7:19 AM, Steven M. Bellovin wrote:
> 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.
Many modules in the Python distfile are separate packages in pkgsrc.
x11/py-Tk will give you the _tkinter module.
Regards,
Min Sik Kim