Re: [PyOpenGL-Users] Undefined glutInit
Brought to you by:
mcfletch
From: Andrew G. <ape...@gm...> - 2019-05-10 15:55:09
|
By the way, I meant this as a bug report. Even if GLUT is not so good to use, it would still be good to fix this bug since a bunch of demo scripts won’t work. Is this mailing list the right place to report a bug? Or should I create an issue on github (https://github.com/mcfletch/pyopengl <https://github.com/mcfletch/pyopengl>)? Thanks, Andrew > On May 9, 2019, at 2:36 PM, Andrew Grace <ape...@gm...> wrote: > > I’m getting this error: > > "OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling” > > I’m using MacOS 10.13.6 High Sierra, and I’m getting the error when trying to use PyOpenGL 3.1.0. I get the error whether using Python 2.7.16 or 3.7.3. > > I installed pyopengl with the command `pip install pyOpenGL` and I installed glut with the command `brew install freeglut`. > > I’m guessing that there is a library loading issue. So, I’ll describe where the glut binaries are located. > > When freeglut gets installed, it puts a symlink into `/usr/local/lib/libglut.dylib` which points to where homebrew installed freeglut in `/usr/local/Cellar/freeglut/3.0.0/lib`. > > When I just try searching Google for the error I’m getting, I have only found Windows users discussing it. The answers were typically to suggest using a precompiled wheel (that includes glut binaries) rather than installing it from pip, or maybe copying the glut.dll file into the same directory that the python program is running. I’ve tried to copy libglut.dylib into the same directory, and I still got the same error. > > I tried using pudb to walk through the code and see if I could find anything obvious. The line it seems to fail on is `glutInit special.py`. I’m unfamiliar with the code, so I don’t know how to debug further. > > Please help! > > Thanks, > Andrew |