tkinter question...

Grzegorz Dostatni grzegorz at ee.ualberta.ca
Tue May 4 13:32:56 EDT 2004


Cheers.

This means that Tkinter is not fully installed. Exactly it means that the
_tkinter.so or _tkinter.dll file is missing.

It may help to let us know which operating system, etc you've got
installed, but...

I assume you're not running Windows - the installer generally does not
leave stuff like that.

Now, you may be running linux or some version of unix.  Try searching
inside python directory for _tkinter.so. On my computer it is:
/usr/local/lib/python2.3/lib-dynload/_tkinter.so.

If this file exists - that means there are libraries it needs that it
cannot find. Try ldd:

grzegorz at e5-05:/usr/local/lib/python2.3/lib-dynload$ ldd _tkinter.so
        libtk8.3.so => /usr/lib/libtk8.3.so (0x4000b000)
        libtcl8.3.so => /usr/lib/libtcl8.3.so (0x400b7000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40138000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40217000)
        libdl.so.2 => /lib/libdl.so.2 (0x4034a000)
        libm.so.6 => /lib/i686/libm.so.6 (0x4034d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

The most likely problems are the libtk8.3 and libtcl8.3. Make sure that
tcl and tk are installed and their libraries are in the LD_LIBRARY_PATH.

If the _tkinter.so file does not exist - you may need to recompile python
from source and read the documentation.

Greg

Advice is what we ask for when we already know the answer but wish we
didn't.
          -- Erica Jong (How to Save Your Own Life, 1977)


On Tue, 4 May 2004 fernando at localhost.localdomain wrote:

> Hi there,
> When I try to run IDLE I get the error bellow. Can anybody help?
> Thanks!
>
> [fernando at exodus fernando]$ idle
> Traceback (most recent call last):
>   File "/usr/local/bin/idle", line 3, in ?
>     from idlelib.PyShell import main
>   File "/usr/local/lib/python2.3/idlelib/PyShell.py", line 19, in ?
>     from Tkinter import *
>   File "/usr/local/lib/python2.3/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
>
>




More information about the Python-list mailing list