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

  2. Steve

    MRAB Guest

    In my installation Tcl is in "C:\Python25\tcl", if that helps.
     
    MRAB, Mar 10, 2011
    #2
    1. Advertisements

  3. Steve

    Steve Guest

    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

    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
    Likes Received:
    0
    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
    Likes Received:
    0
    os.environ['TCL_LIBRARY'] = 'C:\Python26\tcl\tcl8.5'
    os.environ['TK_LIBRARY'] = 'C:\Python26\tcl\tk8.5'
     
    gdalben, Aug 29, 2012
    #6
  7. 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.....
     
    bhargavigoswami, Dec 7, 2012
    #7
  8. Steve

    bhargavigoswami

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

    Gene Heskett Guest

    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.

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

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 (here). After that, you can post your question and our members will help you out.