PyOpenGL on Ubuntu for Python 2.7

4k views Asked by At

I am trying to install PyOpenGL and so far have tried the following ways:

  1. $ pip install PyOpenGL PyOpenGL_accelerate
  2. $ sudo python2.7 -m pip install PyOpenGL PyOpenGL_accelerate
  3. Some variations of the above...
  4. Installation from source.

Unfortunately I still can't run the following imports:

from OpenGL.GL import *  
from OpenGL.GLUT import *
from OpenGL.GLU import *

I am getting the error message:

unable to detect undefined names

Am I missing something? Do I need to install more packages?

Do I need to get OpenGLContext seperately? If so, how do I install that, since

pip install PyDispatcher PyVRML97 OpenGLContext

doesn't work either.

Any help would be much appreciated!

1

There are 1 answers

2
Sudesh On

Try sudo apt-get install python-opengl