Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tcl wasn't installed properly

5,412 views
Skip to first unread message

Steve

unread,
Mar 10, 2011, 10:39:55 AM3/10/11
to
I'm a frequent user of matplotlib on my Windows XP machine. I
recently attempted to install a program that modified my Tcl
installation, and I now get an error message when I attempt to plot
anything in matplotlib. Here is the error message:
---
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\lib-tk\Tkinter.py", line 3758, in _test
root = Tk()
File "C:\Python25\lib\lib-tk\Tkinter.py", line 1647, in __init__
self.tk = _tkinter.create(screenName, baseName, className,
interactive, want
objects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following
directories:
{C:\Program Files\Tcl\lib\tcl8.3} {C:\Program Files\Tcl\lib
\tcl8.3} {C:/Prog
ram Files/Tcl/lib/tcl8.4} C:/Python25/lib/tcl8.4 C:/lib/tcl8.4 C:/
library

This probably means that Tcl wasn't installed properly.
---
I attempted a complete reinstall of python (hoping it would reinstall
Tcl with correct file paths), but I get the same error. Any
suggestions would be appreciated.
Thanks!

MRAB

unread,
Mar 10, 2011, 11:00:55 AM3/10/11
to pytho...@python.org

In my installation Tcl is in "C:\Python25\tcl", if that helps.

Steve

unread,
Mar 10, 2011, 11:30:13 AM3/10/11
to

That is where my installation is located too. Why is it insisting on
looking in "C:\Python25\lib\tcl8.4"? Can I change where it is looking?

Steve

unread,
Mar 10, 2011, 2:44:04 PM3/10/11
to

I figured out the solution. The program I installed must have changed
my windows path names. I changed TCL_LIBRARY and TK_LIBRARY to the
location of my tcl installation, and it works fine now.

bhargav...@gmail.com

unread,
Dec 7, 2012, 1:51:30 AM12/7/12
to
I faced the same problem during my last installation of ns2.35 in ubuntu 11.04.
After I install ns2.35, got message of successful installation of ns. Then I set path in /.bashrc. Then I gave ns command which gave me same error which you got.

The problem is because, ns executable is also at /usr which is conflicting.

Solution:
1. Go to location root-usr-local-bin by giving following command in terminal
cd /usr/local/bin
2. There you would find the ns file. We just need to remove it by giving following command
rm ns
3. Thats it, you are done. Now your ns starts running successfully.

Happy Learning.....

Gene Heskett

unread,
Dec 7, 2012, 2:27:23 AM12/7/12
to pytho...@python.org
On Friday 07 December 2012 02:25:33 bhargav...@gmail.com did opine:

> I faced the same problem during my last installation of ns2.35 in ubuntu
> 11.04. After I install ns2.35, got message of successful installation
> of ns. Then I set path in /.bashrc. Then I gave ns command which gave
> me same error which you got.
>
> The problem is because, ns executable is also at /usr which is
> conflicting.
>
Than change the order in your $PATH, or better yet, do as below, because
the $PATH is normally ordered to find locally installed stuff first.

> Solution:
> 1. Go to location root-usr-local-bin by giving following command in
> terminal cd /usr/local/bin
> 2. There you would find the ns file. We just need to remove it by giving
> following command rm ns
> 3. Thats it, you are done. Now your ns starts running successfully.
>
> Happy Learning.....


Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
BOFH excuse #276:

U.S. Postal Service
I was taught to respect my elders, but its getting
harder and harder to find any...

lvmon...@gmail.com

unread,
Aug 10, 2020, 5:37:34 AM8/10/20
to
Test this (myLib.bat) file:


cls
set "TCL_LIBRARY=C:\Python27\tcl;C:\Python27\tcl\tcl8.5"
set "TK_LIBRARY=C:\Python27\tcl;C:\Python27\tcl\tk8.5"
pause
0 new messages