Tcl error : invalid command name tcl_findLibrary

2020-04-17 07:35发布

问题:

This error appears when I type the following commands (using iPython)Tkinter.Tk(), %pylab, plot ..... or run pylab in general but import pylab doesn't fire any error.

Tcl error : invalid command name tcl_findLibrary

As I know Python installers for Windows already contain a full Tcl/Tk installation so i didn't use anything other than the regular Python installer.

The OS is x64 but I use the x32 installer as some extra python libraries don't have x64 version.

Python 2.7.5 x32 OS: Windows7-x64

回答1:

I've figured it out, I needed to remove tcl_library and tk_library from the environment variables. Although before putting them pylab fired an error saying something like it couldn't find some tcl files, and putting them solved that error but fired this one.