【发布时间】:2012-04-06 15:30:36
【问题描述】:
我已经安装了 Python 2.7 和一些有用的库(比如 Python Image Library) 通过 MacPorts。一切正常。
现在,我想使用 Tkinter。 问题是版本使用X11(我不想使用X11)。
如果我切换到 Apple 安装的 python (/usr/bin/python 而不是 /opt/local/bin/python),Tkinter 可以(不需要 X11)但是 当然,我错过了通过 MacPorts 安装的各种库。
我的问题是:“我如何在安装了 Python 2.7 的情况下使用 no X11 Tkinter 通过 MacPorts”?
提前致谢!
【问题讨论】:
-
您是否尝试使用 +quartz 编译您的 macports Tk 以使用本机 OS X 图形而不是 X11?
-
不...我只是做了类似的事情:port install tk
-
好吧,这为 macports 添加了默认的 tk,即 X11 版本。试试 +aqua 版本(或者更好的 Cocoa 版本,但不确定它是否已经在 macports 中可用)。
-
谢谢 schlenk。我尝试使用 +quartz(没有找到任何 +aqua 变体)。不再需要 X11,但我遇到了 tcl 的问题:TclMacOSXNotifierAddRunLoopMode: Tcl not built with CoreFoundation support 我没有找到任何 tcl 变体来获得支持 CoreFoundation 的 Tcl 版本。也许,fink 会是一个更好的选择?
标签: python macos tkinter macports