鍍金池/ 問(wèn)答/Python  Office/ python2.7 32位版本 OpencvGL3.1.0

python2.7 32位版本 OpencvGL3.1.0

Traceback (most recent call last):
File "C:UserssuchaoDesktopCuraenvlibsite-packageswx-3.0-mswwx_core.py", line 16766, in <lambda>

lambda event: event.callable(*event.args, **event.kw) )

File "CuraguisplashScreen.py", line 15, in DoCallback

self.callback()

File "Curaguiapp.py", line 99, in afterSplashCallback

from Cura.gui import mainWindow

File "CuraguimainWindow.py", line 17, in <module>

from Cura.gui import sceneView

File "CuraguisceneView.py", line 28, in <module>

from Cura.gui.util import previewTools

File "CuraguiutilpreviewTools.py", line 12, in <module>

from Cura.gui.util import openglHelpers

File "CuraguiutilopenglHelpers.py", line 17, in <module>

glutInit() #Hack; required before glut can be called. Not required for all OS.

File "C:UserssuchaoDesktopCuraenvlibsite-packagesOpenGLGLUTspecial.py", line 333, in glutInit

_base_glutInit( ctypes.byref(count), holder )

File "C:UserssuchaoDesktopCuraenvlibsite-packagesOpenGLplatformbaseplatform.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
我64位的win10系統(tǒng)裝32位的python沒(méi)問(wèn)題吧 為什么調(diào)用OPENGL有問(wèn)題

回答
編輯回答
情未了

根據(jù)最后一行錯(cuò)誤信息

OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling

搜索一下即可得到結(jié)果。

  1. 確保在 Python26\Lib\site-packages\OpenGL\DLLS 下有 glut32.dll

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.

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

引用

https://stackoverflow.com/que...

2017年12月21日 18:13