1
votes

I am trying to run a very basic tcl/tk script to make a GUI and I am able to define the window using wm, however when I try to add a button using just "button" it gives me the error "invalid command name "tcl_findLibrary"". Does anyone know what is causing this? I am confident both the tcl and tk are the same version. Someone else suggested that it was a mismatch between versions so I tried having the first line in my script as:

unset env(TCL_LIBRARY)

However this did not change anything. I am writing this script on a piece of hardware that is not my own so I do not have permission to actually change the environment variables. Does anyone have any suggestions?

1
What version of Tcl/Tk? What platform?Brad Lanam
Both versions are 8.5.5, and it's running on OpenSuse 11.2user2551700
If it is a "very basic" script, could you just show us that script?andy mango
Sure, right now I'm just doing wm geometry . 800x800 As I said the window pops up but it throws the error tcl_findLibraryuser2551700
We had some previous inconclusive discussion of this problem at reddit.com/r/Tcl/comments/67sb0x/…Colin Macleod

1 Answers

0
votes

On my Win10 machine I ran into both of these errors:

  • Can't find a usable init.tcl in the following directories ...

  • error "invalid command name "tcl_findLibrary""

The steps I ended up taking to resolve it follows. I don't know if all are needed.

  1. Search all init.tcl files for the line "package require -exact Tcl" that has the highest 8.5.x number

    1. Copy it into the first directory listed in the error messages

    2. Set the environmental variables TCLLIBPATH and TCL_LIBRARY to the directory where you found the init.tcl file

    3. Reboot