包“Tk"的版本冲突:有 8.5.2,正好需要 8.5.15 [英] version conflict for package "Tk": have 8.5.2, need exactly 8.5.15

查看:102
本文介绍了包“Tk"的版本冲突:有 8.5.2,正好需要 8.5.15的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译一个程序 (python2.7),但无论我做什么,我都不断收到此错误:

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]"

这可能意味着 tk 没有正确安装.

This probably means that tk wasn't installed properly.

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

Can someone please explain to me what's the problem here?

推荐答案

第一步:打开C:\Python27\tcl\tcl8.5\init.tcl

step 1: open 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

8.5.15 changed to 8.5.2

第2步:打开C:\Python27\tcl\tk8.5\tk.tcl

step 2: open 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

8.5.15 changed to 8.5.2

这篇关于包“Tk"的版本冲突:有 8.5.2,正好需要 8.5.15的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆