Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Tix not properly installed on OS X?

323 views
Skip to first unread message

Jay Loden

unread,
Jul 24, 2007, 9:40:12 AM7/24/07
to Brian Blais, pytho...@python.org
Brian Blais wrote:
> Hello,
>
> I am running OS X 10.4, on an Intel Mac, Python 2.5 not installed by
> source (I used the binary install from the website). When I do the
> following, I get an error:
>
> Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
> [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Tix
> >>> root=Tix.Tk()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/lib-tk/Tix.py", line 210, in __init__
> self.tk.eval('package require Tix')
> _tkinter.TclError: can't find package Tix
>

I can confirm the same behavior and Google results are not promising:

http://www.thescripts.com/forum/thread653175.html
http://aspn.activestate.com/ASPN/Mail/Message/ActivePython/3525325

I tried installing Tix from the binary TclAqua package, and when I run root=Tix.Tk() I still get the same error (though, interestingly, a Tk window does open). Looks like your best bet right now would be to install Tix via fink if that's an option.

-Jay

Kevin Walzer

unread,
Jul 24, 2007, 10:28:16 AM7/24/07
to

You need an up-to-date installation of the base Tix package on your
system, in the same path as your Tcl/Tk libraries. I downloaded and
built the most recent version of Tix from http://tix.sf.net (dated
November 2006) and the Python samples run fine.

I think the problem is that Tix is generally considered obsolete, or at
least very outdated, by Tcl developers, so many distributions do not
include it. It is not shipped with ActiveState on the Mac, nor does
Apple include Tix in the Tcl/Tk libraries bundled with OS X. From my
perspective there are far better, more modern alternatives, such as
BWidgets, TkTreeCtrl, Tablelist, and Tile (all of which have Python
wrappers) to enhance the core Tk widgets. Tix appears to be more widely
used by Python/Tkinter developers than Tcl/Tk developers.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

Kevin Walzer

unread,
Jul 24, 2007, 10:28:16 AM7/24/07
to Jay Loden, pytho...@python.org

You need an up-to-date installation of the base Tix package on your

Kevin Walzer

unread,
Jul 24, 2007, 1:30:47 PM7/24/07
to Brian Blais, pytho...@python.org
Brian Blais wrote:

> So I tried to build Tix, and it complains about a tcl header file
> (tclPort.h). My Tcl stuff is in
> /System/Library/Frameworks/Tcl.framework/Versions/8.4/, but the header
> file doesn't exist. I assume I need to download the source for Tcl and
> build that, or is it enough to have the headers from the source of tcl?
> I just don't want to break something that is already there.
>
>

You need the source for both Tcl and Tk, and Tix should be in the same
directory tree.

--Kevin

0 new messages