Before installing PyOpenGL be sure to uninstall or remove any previous versions. Failure to do this may result in irratic behavior of Python scripts which use PyOpenGL.
There are two main methods of installing PyOpenGL. On Win32 systems executable installers are available, for other platforms you will have to build PyOpenGL from the source. To do so you will need Distutils 1.0.2pre or higher. Python 2.1 users should already have this installed. To get the latest version of see the distutils-sig page.
You will also need the GLUT library. On UNIX systems this will probably already be present, for other systems see the GLUT homepage.
As discussed in the previous section PyOpenGL can interface to the Numeric library. To enable this support Numeric and its associated headers must be installed at build time.
To build PyOpenGL type
$ python setup.py build
at the shell prompt.
SWIG is not needed to build PyOpenGL, but if SWIG is present on your system then the build_w setup command can be used to rebuild the generated wrappers. Currently only SWIG 1.3a5 is supported.
After building, to install type
$ python setup.py install
This will also execute the build command if required. To find out what various options are accepted by the setup script one can also
$ python setup.py build --help
or
$ python setup.py install --help
The setup script will try to build Togl if the Tkinter module can be imported. Togl version 1.5 is shipped with this version of PyOpenGL. The building of Togl can be bypassed by changing a setting in a platform specific configuration file. The name of this file is based on sys.platform. For instance, on Linux platforms it will be called config/linux.cfg. For more information on this file see the Porting Section.