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

标签 python python-2.7 tcl tk-toolkit

我正在尝试编译一个程序 (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/

相关文章:

python - 如何使用 flask-bootstrap 将标题文本垂直和水平居中

python - Pandas :使用正则表达式更新条件列

python - 在 OSX Mountain Lion 8.2 上使用 Tkinter

python - 如何在PyQt4的QListWidget中制作同步滚动条

python - 如何在sklearn的k-means中检查给定向量的聚类细节

python - 使用 SqlAlchemy 在无限循环中获取新结果

python - 写一份 list 以取得优异成绩

tcl - ctrl+d后如何清除Tcl中的stdin?

testing - 我们如何获得 DejaGnu 中各个测试用例的时间

使用三元运算符的 TCL 条件命令