Eva*_*Aad 18 macos tcl python-idle
我ActiveTcl8.6.1.1.297588-macosx10.5-i386-x86_64-threaded在OS X 10.9.1上安装了.但是,当我idle3从终端运行启动IDLE时,IDLE窗口中会显示以下警告:
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
Run Code Online (Sandbox Code Playgroud)
为什么我安装的较新的ActiveTcl版本无法被IDLE识别?我怎么能纠正这个?
编辑:更多细节.
$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
$ which tclsh
/usr/bin/tclsh
$ ls -l /usr/bin/tclsh*
lrwxr-xr-x 1 root wheel 17 Jan 15 10:45 /usr/bin/tclsh -> /usr/bin/tclsh8.6
lrwxr-xr-x 1 root wheel 67 Oct 25 19:59 /usr/bin/tclsh8.4 -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.4/tclsh8.4
lrwxr-xr-x 1 root wheel 67 Oct 25 19:59 /usr/bin/tclsh8.5 -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.5/tclsh8.5
lrwxr-xr-x 1 root wheel 23 Jan 15 10:45 /usr/bin/tclsh8.6 -> /usr/local/bin/tclsh8.6
$ ls -l /usr/local/bin/tclsh*
lrwxr-xr-x 1 root admin 8 Jan 15 10:40 /usr/local/bin/tclsh -> tclsh8.6
-rwxr-xr-x 1 root admin 41716 Oct 27 04:45 /usr/local/bin/tclsh8.6
Run Code Online (Sandbox Code Playgroud)
Eva*_*Aad 12
根据官方python网站上的"如何使用Python选择使用哪个Tk库"部分的"在Mac OS X上使用Tcl/Tk进行IDLE和tinter"页面,
从该网站下载的Python for Mac OS X安装程序在运行时动态链接到Tcl/Tk Mac OS X框架.Tcl/Tk主要版本是在创建安装程序时确定的,无法覆盖.Python 3.4.x,3.3.x,3.2.x和2.7.x的Python 64位/ 32位Mac OS X安装程序动态链接到Tcl/Tk 8.5框架.
所以看来
根据这些观察,解决方案很明确:
我已经遵循了这些步骤,现在一切似乎都有效.
Pet*_*r D 10
我有OS X 10.10.5.
小智 8
这对我有用
brew remove python3
brew install homebrew/dupes/tcl-tk
brew install python3 --with-tcl-tk
brew linkapps python3
Run Code Online (Sandbox Code Playgroud)