user2551700
user2551700

Reputation: 89

invalid command name "tcl_findLibrary"

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?

Upvotes: 2

Views: 3233

Answers (2)

John GIldea
John GIldea

Reputation: 11

I also ran into both of these errors:

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

  • error "invalid command name "tcl_findLibrary""

I addressed the first error by searching for init.tcl file and cut the init.tcl file to the location that the program wants.

I addressed the second error by moving all file in the tcl8.6/library out to the location where you put the init.tcl at.

Upvotes: 1

Bob K
Bob K

Reputation: 41

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

Upvotes: 1

Related Questions