This question is similar to this other question.
When I run the following code on Mac OS X (it runs fine on Windows):
import Tix
root = Tix.Tk()
I get the following error message:
Traceback (most recent call last): File "", line 1, in 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: can't find package Tix
The Python docs described the issue, but the answer below was not helpful in my case:
If this fails, you have a Tk installation problem which must be resolved before proceeding. Use the environment variable TIX_LIBRARY to point to the installed Tix library directory, and make sure you have the dynamic object library (tix8183.dll or libtix8183.so) in the same directory that contains your Tk dynamic object library (tk8183.dll or libtk8183.so). The directory with the dynamic object library should also have a file called pkgIndex.tcl (case sensitive), which contains the line:
package ifneeded Tix 8.1 [list load "[file join $dir tix8183.dll]" Tix]
If anyone has experienced this error and found a work-around, please fill me in.