I tried to find the answer from the internet and I found this to be caused by the path finding of "tcl". It should be caused by a different system. Adding a path to "sys.path" does not solve it.
I tried to rename "Blade/Lib/PythonLib/Tcl" on the win7 system so that the program could not find it and it went wrong. The message it displays on the console is:
TclError: Can't find a usable init.tcl in the following directories:
../../Lib/PythonLib/TCL/lib/tcl8.0 ./lib/tcl8.0 ./lib/tcl8.0 ./library ./library ./tcl8.0/library ./tcl8.0/library
At this point I observed that it is different from the error message of win10. On win7, the path of tcl is one more than win10 ../../Lib/PythonLib/TCL/lib/tcl8.0
. So EBrowser works fine in win7 system.
Win10's tcl path is of the form "./xxx/xxx", which means that tcl can only be stored in the current working directory "os.getcwd()", that is, to make win10 run EB normally, we have to Tcl Copy to each map folder.
Fortunately, we don't need to do this. There is an environment variable "TCL_LIBRARY" that solves this problem all at once, and it works fine in win7/10.
What we need to do is to extract the entire Tcl folder "Blade/Lib/PythonLib/Tcl" and move it to a place that will not be deleted by mistake. I put it on the C drive and then add the environment variable "TCL_LIBRARY". The value is the root of "init.tcl".
Use the command line directly, for example:
Code: Select all
setx /M TCL_LIBRARY "C:\Tcl\lib\tcl8.0"