gpt4 book ai didi

python - 包 "Tk": have 8. 5.2 的版本冲突,正好需要 8.5.15

转载 作者:太空狗 更新时间:2023-10-29 22:09:19 27 4
gpt4 key购买 nike

我正在尝试编译一个程序 (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 没有正确安装。

有人可以向我解释这里的问题是什么吗?

最佳答案

第一步:打开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

第二步:打开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

关于python - 包 "Tk": have 8. 5.2 的版本冲突,正好需要 8.5.15,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26706022/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com