Tcl/Tk Path problems in Python 1.5.2 installation

bmark987 at my-deja.com bmark987 at my-deja.com
Tue Feb 15 14:17:06 EST 2000


Caveat Emptor (Latin for "Buyer Beware")
------------------------------------------------

I had the same problem.  My installation on Win95 (of the stock Python 1.52
with the TCL 8.0) worked fine.	After a few weeks any Python program which
needed TCL would fail with the "Cannot find usable 'init.tcl' file in...".

Even the Idle shell, which worked before, was broken.  Thanks to the post
below, the problem is fixed by removing the 2 1997 DLLs mentioned in the post
below.

I've tracked it down, and found that the culprit was SpecTCL from sun which
said during the installation that it "needs to install a special version of
TCL 8.0 on your computer"

Boy did it ever!  It would have been nice if it has also told me that it put
those DLLs in ..\windows\system!


Worse, the SpecTCL program won't de-install with add/remove programs!

Beware of other programs (from Sun?) that may do this.	I've taken the
approach that right after I install a new TCL program, I try running IDLE and
make sure that the new program hasn't broken my Python/TCL configuration.
This avoids the "time bomb" type problem, where the install breaks TCL and
you don't find out about it until the mext time you try running a Python TCL
program (which could be months later).

Note that once you have these bad TCL DLLs, de-intalling and reinstalling
Python and TCL DOES NOT FIX THE PROBLEM.  You have to manually remove these
files from your ..\windows\system folder!

Also note that pure TCL program work fine! For example the "Widget Tour" runs
great.



Hope this helps you!

Thanks Dave!!!


In article <388524EF.241C037E at sourcesignal.com>,
  David Nichols <dnichols at sourcesignal.com> wrote:
> Thanks to those who replied ... the problem turned out to be old (1997!)
> version of
> tcl80.dll and tk80.dll in the windows/system directory.  Once those were
> removed
> everything went well.  I was initially deceived because the wish shell
> launched
> correctly, but that turned out to be an artifact of its initial directory -
> wish found
> the correct dlls but programs launched from arbitrary places linked to the
> old ones
> and then died.  So ... Beware that old junk hanging out in windows/system.
>
> Now, back to the task of Python-ing.
>
> David Nichols wrote:
>
> > I just installed python 1.5.2 (running py152.exe and answering 'yes - I
> > want to install Tcl/Tk') and have been unable to get the path set
> > up correctly for graphical applications.  For instance, if I go to the
> > idle directory (//E/Programs/Py152/Tools/idle) and try to launch it I
> > get the following result.
> >
> > ============================================================
> > BASH.EXE-2.02$ python idle.py
> > Traceback (innermost last):
> >   File "idle.py", line 3, in ?
> >     PyShell.main()
> >   File "E:\Programs\Py152\Tools\idle\PyShell.py", line 611, in main
> >     root = Tk()
> >   File "E:\Programs\Py152\Lib\lib-tk\Tkinter.py", line 886, in __init__
> >     self.tk = _tkinter.create(screenName, baseName, className)
> > TclError: Can't find a usable init.tcl in the following directories:
> >     {} ./lib/tcl8.0 . E:/Programs/Py152/tcl8.0/library
> > E:/Programs/Py152/Tools/library
> >
> > This probably means that Tcl wasn't installed properly.
> > ============================================================
> >
> > The directories in sys.path are as follows ...
> > E:\PROGRAMS\PY152
> > E:\PROGRAMS\PY152\DLLs
> > E:\PROGRAMS\PY152\PIL
> > E:\PROGRAMS\PY152\lib
> > E:\PROGRAMS\PY152\lib\lib-tk
> > E:\PROGRAMS\PY152\lib\plat-win
> > E:\Programs\Py152\DLLs
> > E:\Programs\Py152\Lib
> > E:\Programs\Py152\Lib\lib-tk
> > E:\Programs\Py152\Lib\plat-win
> >
> > Tcl in installed in E:\PROGRAMS\Py152\\Tcl, and init.tcl exists in
> > E:\PROGRAMS\Py152\Tcl\lib\tcl8.0 ... but this directory does not
> > seem to be searched.
> >
> > Do I need to set additional environmental variables or make changes
> > to the registry beyond those made by the installer?
> >
> > Thanks in advance for any help
> >
> > David Nichols
> > Source Signal Imaging
> > dnichols at sourcesignal.com
>
>



Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list