Tcl wasn't installed properly

Discussion in 'Python' started by Steve, Mar 10, 2011.

  1. Steve

    Steve Guest

    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!
    Steve, Mar 10, 2011
    #1
    1. Advertising

  2. Steve

    MRAB Guest

    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.
    MRAB, Mar 10, 2011
    #2
    1. Advertising

  3. Steve

    Steve Guest

    On Mar 10, 11:00 am, MRAB <> 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?
    Steve, Mar 10, 2011
    #3
  4. Steve

    Steve Guest

    On Mar 10, 11:30 am, Steve <> wrote:
    > On Mar 10, 11:00 am, MRAB <> 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.
    Steve, Mar 10, 2011
    #4
  5. Steve

    anurikaokoli

    Joined:
    Feb 21, 2012
    Messages:
    1
    Please i have similar problem with my cywing, how did you change your TCL_LIBRARY and TK_LIBRARY.
    anurikaokoli, Feb 21, 2012
    #5
  6. Steve

    gdalben

    Joined:
    Aug 29, 2012
    Messages:
    1
    os.environ['TCL_LIBRARY'] = 'C:\Python26\tcl\tcl8.5'
    os.environ['TK_LIBRARY'] = 'C:\Python26\tcl\tk8.5'
    gdalben, Aug 29, 2012
    #6
  7. Steve

    Guest

    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.....
    , Dec 7, 2012
    #7
  8. Steve

    bhargavigoswami

    Joined:
    Dec 7, 2012
    Messages:
    1
    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.....
    bhargavigoswami, Dec 7, 2012
    #8
  9. Steve

    Gene Heskett Guest

    On Friday 07 December 2012 02:25:33 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...
    Gene Heskett, Dec 7, 2012
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arjen
    Replies:
    3
    Views:
    68,851
    JackMcKenzie
    Nov 1, 2007
  2. Robert Maas, see http://tinyurl.com/uh3t

    Writing HTML parser wasn't as hard as I thought it'd be

    Robert Maas, see http://tinyurl.com/uh3t, Apr 20, 2007, in forum: HTML
    Replies:
    19
    Views:
    1,747
    Robert Maas, see http://tinyurl.com/uh3t
    Apr 26, 2007
  3. rote
    Replies:
    0
    Views:
    1,723
  4. Vincent
    Replies:
    12
    Views:
    11,945
    Jerry Hui
    Mar 19, 2010
  5. Mumia W.

    Inline::Tcl vs. Inline::Tcl

    Mumia W., Aug 23, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    131
    Mumia W.
    Aug 23, 2006
Loading...

Share This Page