Subject: Re: Python and Tk?
To: Steven M.Bellovin <email@example.com>
From: Min Sik Kim <minskim@NetBSD.org>
Date: 11/04/2005 09:18:14
On Nov 4, 2005, at 8:36 AM, Steven M. Bellovin wrote:
> In message <1BF6DB3F-2ECC-4DD2-905C-276AB91A9580@NetBSD.org>, Min
> Sik Kim write
>> 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
>> Many modules in the Python distfile are separate packages in pkgsrc.
>> x11/py-Tk will give you the _tkinter module.
> Thanks -- I'd looked in lang, but not x11. Not that it built cleanly
> lots of the patches failed.
That's normal. py-Tk doesn't extract all files in the python
distfile; instead, it extracts only two .c files needed to build the
_tkinter module. pkgsrc will ignore all patch-related errors and
build the package.
Min Sik Kim