Issue 19373: Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks (original) (raw)
On OS X 10.9 Mavericks, there is a problem with Aqua Cocoa Tk 8.5 (8.5.15 or earlier) when run in 64-bit mode, the default for most applications. The symptoms are that Tk widgets may not be properly drawn or updated on the screen unless some HID activity takes place, like mousing over the widget or by entering text via the keyboard. Since the problem can also be reproduced using the Tk wish shell, it is not a Python problem but it can have an impact on Tkinter-based applications, like IDLE. The problem is being tracked by the Tk project here:
https://core.tcl.tk/tk/tktview?name=53f7a1b553
The problem affects current and recent third-party Tk 8.5.x releases, such as the ActiveTcl 8.5.15 recommended for use with current python.org 3.3.2 and 2.7.5 installers. It also affects the Built-in 8.5.x Tcl/Tk included with pre-release python.org 3.4.x installers. It appears that the problem does not affect the Apple Tk 8.5.9 shipped with OS X 10.9, which is used by the system Pythons included in OS X 10.9. However, as in recent previous OS X releases, the Apple 8.5.9 Tk has serious problems so its use is not recommended: see http://www.python.org/download/mac/tcltk/ for more information.
This issue will be updated as solutions become available. In the meantime, there are some workarounds:
- Run Tkinter applications in 32-bit mode. If you are using Python 2.7.x, 3.2.x, 3.3.x, or 3.4.x from one of the python.org "Mac OS X 64-bit/32-bit x86-64/i386 Installers", the easiest way to do this is to append "-32" to the python command name:
/usr/local/bin/python3.4 -> /usr/local/bin/python3.4-32 /usr/local/bin/python3.3 -> /usr/local/bin/python3.3-32 /usr/local/bin/python2.7 -> /usr/local/bin/python2.7-32
If you are using a Python from a python.org "Mac OS X 32-bit i386/PPC Installer", you will not see this problem; but keep in mind that those Pythons are linked with Tcl/Tk 8.4 for compatibility with older OS X releases.
- If you launch IDLE from a 64-bit-capable installation by double-clicking on its icon in the 10.9 Finder, you may see this problem. (Due to a quirk, IDLE 2.7 launched this way may not be affected.) You can force IDLE 3.x to run in 32-bit mode by launching it from a Terminal window instead of double-clicking. For Python 3.x, try
/usr/local/bin/python3.3-32 -m idlelib
/usr/local/bin/python3.4-32 -m idlelib
For Python 2.7.x, if you need to launch from the command line rather than double-clicking, try:
/usr/local/bin/python2.7-32 /usr/local/bin/idle2.7
Update: release candidate ("rc1") packages for Python 3.3.3 and 2.7.6 have been created. They are available here:
http://www.python.org/download/releases/3.3.3/ http://www.python.org/download/releases/2.7.6/
For 3.3.3 and 2.7.6, the python.org OS X 64-bit/32-bit x86-64/i386 installers now also include built-in versions of Tcl/Tk 8.5, eliminating the need to install third-party versions of Tcl/Tk. Shortly after the rc1 packages were released, an upstream Tk fix for this problem was published by the Tk project. Updated "rc1_rev1" installers which include that Tk fix should be available shortly on the 3.3.3 and 2.7.6 web pages. The Tk fix will also be included in the final 3.3.3 and 2.7.6 releases and in the next pre-release of 3.4.0 (expected to be 3.4.0b1). If you are using a third-party version of Tcl/Tk 8.5 on OS X 10.9, check with the vendor for fix availability.
Update: ActiveTcl 8.5.15.1 is now available and includes the fix for the 10.9 refresh problem documented here.
Unfortunately, the built-in versions of Tcl/Tk 8.5 included with the pre-release python.org OS X 64-bit/32-bit x86-64/i386 installers for 3.3.3rc1 and 2.7.6rc1 (as described above) inadvertently broke compatibility with several third-party projects. As a result, as of 3.3.3rc2 and 2.7.6 final, the built-in Tcl/Tk support has been removed and these Pythons once again dynamically link with third-party Tcl and Tk 8.5 frameworks in /Library/Frameworks, such as those from ActiveState. You should install ActiveTcl 8.5.15.1 (or later 8.5.x versions) for use with these releases, if possible.