[docs] [issue23156] Update tix install information in tkinter tix chapter of doc

Ned Deily report at bugs.python.org
Sun Jan 4 10:29:41 CET 2015

Ned Deily added the comment:

I'm no expert on Tk but, as best I can tell, Tix is a very old third-party set of Tk extension widgets that has been made obsolete by the Ttk widget set integrated into standard Tk 8.5. See, for example, Kevin Walzer's comments here: http://www.thecodingforums.com/threads/state-of-the-art-tkinter-tk-8-5-tix.651741/.

Unlike Ttk, Tix is not part of the core Tk distribution so whether or not Tix is available depends on the Tcl/Tk distribution in use.  For the Python Windows installer, we ship our own version of Tcl/Tk and include a version of Tix.

For the Python OS X installer, we currently do not ship our own version of Tcl/Tk, rather we depend on the user installing a third-party version of Tcl/Tk (we currently recommend ActiveState's ActiveTcl if the use is compatible with ActiveState's license) or falling back to an (old) Apple-supplied version of Tcl/Tk.  Neither Apple nor ActiveState include Tix by default.  However, ActiveTcl does include Tix in the Tcl Extension Archive (http://wiki.tcl.tk/17340) it maintains and provides a command-line program, teacup, to download, install, and manage TEA extensions, analogous to Python's pip.  So it's straightforward to install Tix if you are using ActiveTcl:

    sudo teacup install Tix

Unfortunately, A/S's OS X version of Tix currently downloadable via teacup is built as a 32-bit binary only.  The vast majority of users, running on up-to-date OS X systems, will run into another failure since their Python will likely be running in 64-bit mode:

>>> root = Tix.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tix.py", line 221, in __init__
    self.tk.eval('package require Tix')
_tkinter.TclError: dlopen(/Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/Tix8.4.3/libTix8.4.3.dylib, 6): no suitable image found.  Did find:
	/Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/Tix8.4.3/libTix8.4.3.dylib: mach-o, but wrong architecture

Depending on the Python instance in use, running a universal Python in 32-bit mode may be an option or installing a 32-bit-only Python can be done.  Either way, it's an unexpected hack.  I don't know whether there is a fundamental problem in building Tix for 64-bit on OS X but I think it is telling that there isn't one available from A/S.

Likewise, for other platforms, how you make Tix available, if at all, varies.  For example, Ubuntu and Debian distributions also do not install Tix by default but it can be installed via their standard package managers.

So, all in all, trying to document Tix installation is a major can of worms; I don't think we should be trying to do so in the Python documentation.  Further, it seems like we should be strongly discouraging use of Tix in favor of Ttk.


Python tracker <report at bugs.python.org>

More information about the docs mailing list