pee*_*ech 6 python tcl python-2.7
我正在尝试编译一个程序(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]"
Run Code Online (Sandbox Code Playgroud)
这可能意味着tk安装不正确.
有人可以向我解释一下这里有什么问题吗?
小智 15
第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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
8.5.15改为8.5.2