[Tkinter-discuss] Tkinter fails - tcl/tk installation in Python fails

Alex Luso tapadamocho at yahoo.com
Wed Oct 26 21:15:15 CEST 2005


  Hi,

  I am having a hard time with Tkinter module of
Python (v.2.4.2). I followed the advice from a Python
help site ("Step 1 - can _tkinter be imported? Try
import _tkinter from a Python prompt) and indeed I
cannot. So it turns out that my installation of Python
(the default built into FC4) did not install Tcl/Tk
module correctly. I have tried to do it manually,
using the latest Python (v.2.4.2) and the latest
downloads of Tcl/Tk (v.8.4), but no matter what I do I
can't succeed. If I let the Python installation do the
automatic detection of Modules, it fails to install
tcl . If I edit the /Modules/Setup file, it still
fails. This time is says that:
----------
./python: error while loading shared libraries:
libtk8.4.so: cannot open shared object file: No such
file or directory
make: *** [sharedmods] Error 127
----------

These is where everything is installed:

$ whereis tcl
tcl: /usr/local/lib/tcl8.4 /usr/share/tcl8.4
$ whereis tk
tk: /usr/local/lib/tk8.4
$ ls /usr/local/include
tclDecls.h  tcl.h  tclPlatDecls.h  tkDecls.h  tk.h 
tkPlatDecls.h

And this is a snippet of /Modules/Setup:
--------------------------
# The _tkinter module.
#
# *** Always uncomment this (leave the leading
#underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk 
# libraries are:
        -L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk
# headers are:
        -I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 
# header files are:
        -I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
#       -I/usr/openwin/include \
# *** Uncomment and edit for Tix extension only:
#       -DWITH_TIX -ltix8.1.8.2 \
# *** Uncomment and edit for BLT extension only:
#       -DWITH_BLT
#-I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension
#only:
#     (See http://www.pythonware.com/products/pil/ for
#more info)
#       -DWITH_PIL -I../Extensions/Imaging/libImaging 
#tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
#       -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk
#versions:
        -ltk8.4 -ltcl8.4 \
# *** Uncomment and edit to reflect where your X11
#libraries are:
        -L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
#       -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
#       -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
#       -lld \
# *** Always uncomment this; X11 libraries to link
#with:
        -lX11
------------------

  What on earth am I doing wrong? And why doesn't the
default installation of Python that comes with FC4
come with Tcl/Tk installed, as advertised?

  I am running linux on a new Fedora (FC4)
installation.

  Thanks for any help,
  -ALex


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


More information about the Tkinter-discuss mailing list