Tcl wasn't installed properly

S

Steve

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.
 
M

MRAB

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!

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

Steve

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

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?
 
S

Steve

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?

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.
 
Joined
Feb 21, 2012
Messages
1
Reaction score
0
On Mar 10, 11:30*am, Steve <[email protected]> wrote:
> On Mar 10, 11:00*am, MRAB <[email protected]> wrote:
>
>
>
>
>
>
>
>
>
> > On 10/03/2011 15:39, Steve wrote:

>
> > > 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!

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

>
> 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?


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.

Please i have similar problem with my cywing, how did you change your TCL_LIBRARY and TK_LIBRARY.
 
Joined
Aug 29, 2012
Messages
1
Reaction score
0
os.environ['TCL_LIBRARY'] = 'C:\Python26\tcl\tcl8.5'
os.environ['TK_LIBRARY'] = 'C:\Python26\tcl\tk8.5'
 
B

bhargavigoswami

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.....
 
Joined
Dec 7, 2012
Messages
1
Reaction score
0
Solution I got for the problem of init.tcl and tcl not properly installed

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.

Hope this helps you find solution.
Happy Learning.....
 
G

Gene Heskett

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...
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top