PyOpenGL glutInit NullFunctionError

前端 未结 11 1779
梦如初夏
梦如初夏 2020-11-30 05:13

I am running Anaconda Python 2.7 on a Win7 x64 machine and used

pip install PyOpenGL PyOpenGL_accelerate

at the Anaconda command line to i

相关标签:
11条回答
  • 2020-11-30 05:17

    According to the link below the problem was with the glut installation rather than pip install. It seems glut files are not part of PyOpenGL or PyOpenGL_accelerate package. You have to download them seperately.

    https://stackoverflow.com/a/39181193/7030177

    Windows user can use the link below to download glut as mentioned in the given link. ftp://ftp.sgi.com/opengl/glut/glut3.html.old#windows

    Linux Users can just install glut using the following command:

    sudo apt-get install freeglut3-dev
    

    Hope this helps :)

    0 讨论(0)
  • 2020-11-30 05:17

    I know it is a little late. I also encountered this problem with python 2.7 (32 bits) in windows. I tried the method mentioned by user2723240 but still failed. Finally, I solved this problem by copying glue32.dll to System32 in C drive and copy glue32.dll into my source file directory. It works well now.

    0 讨论(0)
  • 2020-11-30 05:20

    If installing PyOpenGL from easy_install, pip or conda, make sure that you have already installed a GLUT implementation, such as FreeGLUT (prebuilt Windows binaries).

    For FreeGLUT, copy the distributed files to a location on your hard drive and then add the path to the bin directory (which contains the GLUT DLLs) to your PATH environment variable. Then PyOpenGL should work as expected.

    0 讨论(0)
  • 2020-11-30 05:21

    I got the same error and a solved installing required files from here.

    Download these files:

    • PyOpenGL-3.1.1-cp27-cp27m-win32.whl (download if your computer 32 bits )

    • PyOpenGL-3.1.1-cp27-cp27m-win_amd64.whl (download if your computer 64 bits )

    • PyOpenGL_accelerate-3.1.1-cp27-cp27m-win32.whl (download if your computer 32 bits )

    • PyOpenGL_accelerate-3.1.1-cp27-cp27m-win_amd64.whl (download if your computer 64 bits )

    install these .whl files for 64 bits:

    pip install PyOpenGL-3.1.1-cp27-cp27m-win_amd64.whl
    pip install PyOpenGL_accelerate-3.1.1-cp27-cp27m-win_amd64.whl
    

    install these .whl files for 32 bits:

    pip install PyOpenGL-3.1.1-cp27-cp27m-win32.whl 
    pip install PyOpenGL_accelerate-3.1.1-cp27-cp27m-win32.whl
    
    0 讨论(0)
  • 2020-11-30 05:22

    After looking around for a solution to a similar problem I ran 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 downloaded as pip from the official source. Uninstall OpenGL using pip, then download OpenGL from http://www.lfd.uci.edu/~gohlke/pythonlibs/

    0 讨论(0)
  • 2020-11-30 05:27

    My case is different, Python 3.6 and windows 10. However exactly same error message. Tried all above solutions, no success. Downloaded WHL file right to my computer and version of python from HERE

    Then pip installs filename.Whl, no more issue!

    The answer was from a Chinese website: Answer Link

    0 讨论(0)
提交回复
热议问题