I am trying to compile a program (python2.7) but no matter what I do I keep getting this error:
C:/Python27/tcl/tk8.5/tk.tcl: version conflict for package "Tk": have 8.5.2, need exactly 8.5.15
version conflict for package "Tk": have 8.5.2, need exactly 8.5.15
while executing
"package require -exact Tk 8.5.15"
(file "C:/Python27/tcl/tk8.5/tk.tcl" line 18)
invoked from within
"source C:/Python27/tcl/tk8.5/tk.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $file]"
This probably means that tk wasn't installed properly.
Can someone please explain to me what's the problem here?
step 1: open C:\Python27\tcl\tcl8.5\init.tcl
8.5.15 changed to 8.5.2
step 2: open C:\Python27\tcl\tk8.5\tk.tcl
8.5.15 changed to 8.5.2
Tk comes in (conceptually) two pieces:
These must be exactly matched to each other (it's the only way in which they are warranted to work correctly). By default, the Tk DLL includes the path where it can find its scripts, but it can be overridden by environment variables; that mechanism is mainly intended to support pre-installation testing, though sometimes it gets used rather more than it really ought.
You appear to have configured things so that you have one version of the DLL (8.5.2) whereas a different version of the scripts (8.5.15). This could be because you've linked against the wrong version of the DLL, or because you have an environment variable (
TK_LIBRARY
) set to point to the wrong installation. Which it is is a little hard to tell from the error message: all it really says is that there is a version mismatch.