Mac Ports Python 2.6.6 and Tkinter
I apologize if this has been asked but does Tki开发者_StackOverflow中文版nter work in Python 2.6.6 when installed with Mac Ports? Or do I need to pass the no_tkinter variant?
Thanks for any help!
As of MacPorts python26 @2.6.6_0
and tk @8.5.8_0
, Tkinter appears to only work if you don't mind using an X11-based Tk. There is a +quartz
variant for the Tk
port which does not require X11 but it is not yet supported in 64-bit mode, the preferred build and execution architecture on OS X 10.6, and at the moment it seems to not work in 32-bit mode either (tk @8.5.8_0
). If you don't mind having MacPorts pull in a bunch of X11
client build dependencies and using X11
for Tkinter
applications, the default variant looks like it works OK (lightly tested with OS X 10.6.4 and python26 @2.6.6_0
). This applies to IDLE
as well, since it uses Tkinter
. Otherwise, stick to +no_tkinter
if you can live without Tkinter
and IDLE
.
By the way, the Python 2.6.6 installed by the python.org installer (32-bit only) uses either the Apple-supplied Quartz
Tk 8.4 for OS X 10.4 through 10.6 or it will use an ActiveState Tcl/Tk 8.4 if you have installed it. MacPorts currently has no provision for using either of them.
pytkinter 2.4.6 is the latest version available on macports and works with python 2.4
- http://trac.macports.org/browser/trunk/dports/python/py-tkinter/Portfile
精彩评论