PyOpenGL on OS X

Published on 2007-10-16 20:17:00+00:00
OS   OpenGL   Python   X  

Update: July 7, 2010: For the past year or so I've been using virtualenv, virtualenvwrapper, and pip to manage and install python packages, and I highly encourage everyone to use these tools! It may take a bit to learn how to use these tools, but once you do, the rewards are great! (especially when using 3rd party python libraries on Mac OS X).

To install PyOpenGL using the aforementioned tools, you'd simply do the following.

mkvirtualenv gl
pip install pyopengl

That's all there is to it! I grabbed the demo apps from, and verified that the script works, so this should get you started.

I'm leaving the old post below, but again, check out virtualenv and pip. You'll be happy that you did!

I actually got this working quite a while ago, but for some reason I've gotten busy and never documented it. In fact, installing PyOpenGL was almost so easy it's not even worth mentioning... Except... it was so easy, so it's worth mentioning!

Here are the steps to install PyOpenGL on Mac OS X (10.4.10):

  1. You'll need to get setuptools, and the easiest way to do that is with EasyInstall (see You'll download the file, and just run: python

  2. Download PyOpenGL from their download page. (Side Note: I also grabbed the OpenGLContext). Now, once you untar/unzip it, you should have a PyOpenGL/ directory. Just open a Terminal, cd into that directory, and run python build. Once that is finished, run python install

  3. Now, do the same for OpenGLContext...