It was a little difficult. There was a trap that pip install pretended to be normal and didn't actually work.
Work time May 2020 Win10 Python3.8
First I tried using python.exe -m pip install pyopengl
.
-Installation completed normally.
-Sample program execution (PyODE "Tutorial 3".)
→ Error when referring to glut.
glut reference error
PS C:\********> C:\Python380\python.exe .\tutorial3.py
Traceback (most recent call last):
File ".\tutorial3.py", line 177, in <module>
glutInit()
File "C:\Python380\lib\site-packages\OpenGL\GLUT\special.py", line 333, in glutInit
_base_glutInit( ctypes.byref(count), holder )
File "C:\Python380\lib\site-packages\OpenGL\platform\baseplatform.py", line 423, in __call__
raise error.NullFunctionError(
OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling
I tried adding freeglut, but there was no change in symptoms (freeglut was unnecessary after all)
After all, I gave up this method and deleted it with pip uninstall pyopengl
.
This site was helpful ↓ http://blawat2015.no-ip.com/~mieki256/diary/201506185.html As described ・ Https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl Obtained "PyOpenGL-3.1.5-cp38-cp38-win_amd64.whl" from. -Install WHL with the pip command → The sample program was executed normally.
By the way, it seems that "PyOpenGL_accelerate" is also included with pyopengl, but I have not installed it yet.
Recommended Posts