Today, I'm going to learn the programming journey of the father and the son, when I see the first GUI running (code below):
1 Import Easygui 2 Easygui.msgbox ("Hello there! ")
Found an error: Tcl Init error:can ' t find a usable INIT.TCL in the following directories, and then shows a large heap of nonexistent paths that do not exist in tcl8.5.
Workaround:
1. Unloading the python2.7 reload, found that still, the reload does not work.
2.http://blog.csdn.net/chentravelling/article/details/51872398 This article prompts me to modify the version, but my python27 path is shown below, I have two related TCL files: Init.tcl and INIT.TCL, which one do I use? The middle of the Lib under the please ignore, I changed the right after adding to, this also does not work.
3. Finally, I found the answer from Http://blog.csdn.net/qq_33233768/article/details/71786654 's blog, and he said, "The last thing I found was that the system was looking for the wrong library directory," which reminds me, Although the blog is about CentOS, but the situation is applicable, his solution is "the system default to find the library directory is the contents of the/usr/lib folder, into the/usr/directory, I found there is a lib64 folder, So I tried to lib64 the library in this folder to the environment variables ", My Way is:
- Found a TCL directory under Python27
- There is a tcl8.5 directory under the Tcl folder.
- Copy the tcl8.5 directory under the TCL directory to the D:\files\Python27\Lib, and then configure the D:\FILES\PYTHON27\LIB to the environment variable (the environment variable I configured earlier is D:\files\Python27)
- This goes from PowerShell into Python interactive mode, enter the previous two commands, finally the frame, haha ^_^
In addition, I have been a bit idle did not respond, this can also run normally, do not know whether the two have a relationship.
Easygui.msgbox ("Hello there!") Error: Tcl_init Error:can ' t find a usable INIT.TCL in the following directories problem resolution