[Pythonmac-SIG] problem importing OpenGL.Tk

Bob Ippolito bob at redivi.com
Mon Oct 13 05:35:36 EDT 2003

On Oct 13, 2003, at 1:17, Patrick Moran wrote:

> I'm new to Mac ... and I'm in the process of porting over some
> 3-D graphics tools I have running under Linux.  My application
> uses PyOpenGL.  I downloaded MacPython-OSX-2.3.1.  Then,
> using PackageManager, I downloaded PyOpenGL-
> binary and _tkinter-2.3-binary.  So far seems OK.  The basic
> Tkinter widgets are working.  Cool.  But when I try to import
> OpenGL.Tk, in preparation to do some 3-D rendering, I get:
> [Patrick-Morans-Computer:~] pmoran% /usr/local/bin/pythonw
> Python 2.3 (#2, Jul 30 2003, 11:45:28)
> [GCC 3.1 20020420 (prerelease)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
> >>>
> >>> import OpenGL.GL
> >>> import OpenGL.Tk
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File  
> "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- 
> packages/OpenGL/Tk/__init__.py", line 81, in ?
>     _default_root.tk.call('package', 'require', 'Togl')
> _tkinter.TclError: can't find package Togl
> I have a PowerBook, running  OS X 10.2.8.
> Help, suggestions, would be appreciated.  Is there some sort of path
> I need to set?

Unfortunately, you're out of luck.  Togl has not been ported to OS X  
yet, at least not for AquaTk.  I just took a look at Togl and it seems  
nontrivial to compile for OS X (at least a few hours).  Your best bet  
is to get rid of your dependency on Tk altogether and switch to  
something like wxPython, pygame, GLUT, PyObjC + Cocoa, etc. for your  


More information about the Pythonmac-SIG mailing list