tkinter question...

  • Thread starter Grzegorz Dostatni
  • Start date
G

Grzegorz Dostatni

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@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)
 
F

fernando

Hi there,
When I try to run IDLE I get the error bellow. Can anybody help?
Thanks!

[fernando@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
 
F

Fernando

Well,
Here is what I get:

[root@exodus lib-dynload]# uname -a
Linux exodus 2.6.5 #1 Fri Apr 30 13:52:04 CDT 2004 i686 i686 i386 GNU/Linux

[root@exodus lib-dynload]# pwd
/usr/local/lib/python2.3/lib-dynload

[root@exodus lib-dynload]# ldd _tkinter.so
ldd: ./_tkinter.so: No such file or directory

[root@exodus lib-dynload]# rpm -q tk
tk-8.3.5-93

[root@exodus lib-dynload]# rpm -q tcl
tcl-8.3.5-93

[root@exodus lib-dynload]#

Thanks!
Fernando,









Grzegorz said:
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@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)


Hi there,
When I try to run IDLE I get the error bellow. Can anybody help?
Thanks!

[fernando@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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Tkinter, IDLE keeps crashing 5
Building static Python binary 0
Freezing a static executable 1
Help - my Tkinter is broken 3
PyType_IsSubtype () 4
tkinter 0
Python 2.7, tkinter problem on OSX 3
Odd build errors 0

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top