Answer the question
In order to leave comments, you need to log in
PyOpenGL doesn't install GLUT, why is that?
Installed PyOpenGL via terminal, libraries are visible, modules are imported without problems, but the following code
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import sys
glutInit()
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB)
glutInitWindowSize(300, 300)
glutInitWindowPosition(50, 50)
glutInit(sys.argv)
glutCreateWindow(b"Happy New Year!")
glutMainLoop()
C:\PyCharm\projects\runner\venv\Scripts\python.exe C:/PyCharm/projects/runner/ruiner.py
Traceback (most recent call last):
File "C:/PyCharm/projects/runner/ruiner.py", line 6, in <module>
glutInit()
File "C:\PyCharm\projects\runner\venv\lib\site-packages\OpenGL\GLUT\special.py", line 333, in glutInit
_base_glutInit( ctypes.byref(count), holder )
File "C:\PyCharm\projects\runner\venv\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
Process finished with exit code 1
Answer the question
In order to leave comments, you need to log in
In general: installation via -pip incorrectly installs glut, if you really need a library, then install it through the "wheel", but you have to get confused with finding the right file, I couldn't find it for myself (
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question