PyOpenGL ubuntu 14.04: undefined function error

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, for example. this is

from OpenGL.GLUT import * print bool(glutInit) glutInit(sys.argv) 

will display "True" and an error message will appear:

 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 do not understand any suggestions? Thanks.

+5
source share
3 answers

It works after i installed the python opengl package

 sudo apt-get install python-opengl 

Before that, I installed it via pip, resulting in the error above:

 pip install PyOpenGL PyOpenGL_accelerate 

I still don't know why, but now it works.

+4
source

I know a little late. I also ran into this problem with python 2.7 (32 bits) in windows. I solved this problem by copying the glue32.dll file in System32 to drive C and copying the glue32.dll file to the directory of the source file. It works well.

+2
source

Python 2.7 32bit Windows 7

This solution works:

After finding a solution to a similar problem, I came across this google group that answers the question: https://groups.google.com/forum/#!topic/glumpy-users/aC1NjEHXtEE

There is a problem with OpenGL.GLUT when downloading as a pip from an official source. Uninstall OpenGL with pip, then download OpenGL from http://www.lfd.uci.edu/~gohlke/pythonlibs/

from PyOpenGL glutInit NullFunctionError

0
source

Source: https://habr.com/ru/post/1208573/


All Articles