Mailing List Archive

Tk and a little headache (installation troubles)
For some strange reason I'm having trouble getting the tk libray to work
with python. I've installed tk & tcl 8.2 with a standard install. I've
also sucessfully (or so I thought) re-compiled Python after editing the
Modules/Setup file. I am able to import _tkinter but if I try to kick
up a quick window with say:
from Tkinter import *
widge1 = Label(None, text="Please, Please work! ")

I get a traceback error(in quotes):

"Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/local/Python-1.5.2/Lib/lib-tk/Tkinter.py", line 1410, in
__init__
Widget.__init__(self, master, 'label',cnf, kw)
File "/usr/local/Python-1.5.2/Lib/lib-tk/Tkinter.py", line 1410, in
__init__
BaseWidget._setup(self, master, cnf)
File "/usr/local/Python-1.5.2/Lib/lib-tk/Tkinter.py", line 1410, in
__init__
_default_root = Tk()
File "/usr/local/Python-1.5.2/Lib/lib-tk/Tkinter.py", line 1410, in
__init__
self.tk = _tkinter.create(screenName, baseName, className)
TclError: Can't find a useable init.tcl in the following directories:


This probably means the Tcl wasn't installed properly. "

Okay, well after reinstalling everingthing just for kicks I began trying
to figure out a way for Tcl to find init.tcl.
in my path(in 'profile') I added "export TCL_LIBRARY =
/usr/local/lib/tcl8.2 " but that didn't seem to work. I thought
that just maybe it might have something to do with the Setup file having
the wrong path. "TKPATH :=lib-tk" is what it's set to. I'm still
fairly new to Linux (Slackware 4.0) so I'm sure this is some dumb newbie
error <wink> Any ideas what I'm doing wrong?
Tk and a little headache (installation troubles) [ In reply to ]
Brett Gengler wrote:

> For some strange reason I'm having trouble getting the tk libray to
> work with python. I've installed tk & tcl 8.2 with a standard
> install.

> Any ideas what I'm doing wrong?

Python still uses 8.0.

There were patches posted in early June (from Dieter Maurer?) for
using 8.1.

- Gordon