如何更改Python安装的tk版本? [英] How to change the tk version of your Python installation?
问题描述
我刚刚使用此过程删除了旧的Python框架,并且已经为我的体系结构安装了Python 3.4.3,根据以下命令 uname -p
看来是 i386
,所以我已经下载并安装了以下版本 Mac OS X 32位i386/PPC安装程序
.
I have just removed my old Python framework using this procedure, and I have installed Python 3.4.3 for my architecture, which appears to be i386
according to the following command uname -p
, so I have downloaded and installed the following version Mac OS X 32-bit i386/PPC installer
.
现在,我想使用 tkinter
,但是似乎它使用的是Tcl/Tk版本 8.4
,而不是最新的 8.6
:
Now, I want to use tkinter
, but it seems that it is using the Tcl/Tk version 8.4
instead of the lastest one 8.6
:
>>> tkinter.TclVersion
8.4
>>> tkinter.TkVersion
8.4
>>>
现在,我在目录/Library/Frameworks/Tk.framework/
下检查了已安装的版本,但结果是:
Now, I have cheked under the directory /Library/Frameworks/Tk.framework/
which versions I have installed, but the result is:
8.5 8.6 Current
这意味着我刚刚安装的Python发行版正在其他地方使用其他版本的 Tcl/Tk
.
Which means that the Python distribution that I have just installed is using another version of Tcl/Tk
from somewhere else.
现在,如何更改正在使用的 Tcl/tk
版本?
Now, how do I change the Tcl/tk
version that is being used?
推荐答案
您必须重新安装python.
You have to reinstall python.
$ pip卸载python3
$ pip uninstall python3
$ pip安装python3
$ pip install python3
这篇关于如何更改Python安装的tk版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!