After upgrading to ubuntu 14.04 and installing PyOpenGL via pip. It worked fine under ubuntu 12.04, but now I get errors every time I try to use a function from OpenGL.GLUT, e.g. this
from OpenGL.GLUT import *
print bool(glutInit)
glutInit(sys.argv)
will print out "True" and an error message:
File "/usr/local/lib/python2.7/dist-packages/OpenGL/GLUT/special.py", line 333, in glutInit
_base_glutInit( ctypes.byref(count), holder )
File "/usr/local/lib/python2.7/dist-packages/OpenGL/platform/baseplatform.py", line 407, in __call__
self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling
I don't understand it, any suggestions? Thanks.
It is working after I installed the python opengl package
sudo apt-get install python-opengl
Before that I installed it via pip leading to the error above:
pip install PyOpenGL PyOpenGL_accelerate
I still don't know why, but it is working now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With