软件包“ Tk”的版本冲突:拥有8.5.2,恰好需要8.5.15
问题内容:
我正在尝试编译程序(python2.7),但是无论我做什么我都会不断收到此错误:
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]"
这可能意味着tk安装不正确。
有人可以告诉我这里有什么问题吗?
问题答案:
步骤1:打开C:\ Python27 \ tcl \ tcl8.5 \ init.tcl
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
package require -exact Tcl 8.5.15
8.5.15更改为8.5.2
步骤2:打开C:\ Python27 \ tcl \ tk8.5 \ tk.tcl
package require Tcl 8.5 ;# Guard against [source] in an 8.4- interp before
;# using 8.5 [package] features.
# Insist on running with compatible version of Tcl
package require Tcl 8.5.0
# Verify that we have Tk binary and script components from the same release
package require -exact Tk 8.5.15
8.5.15更改为8.5.2