0

I am trying to install PyOpenGL on my MacBook Pro 16" for distant studies at university. I am running macOS Big Sur however I read that this OS version could cause problems with OpenGL.

I have tried this command for the installation:

pip3 install PyOpenGL PyOpenGL_accelerate

Everything seems to be correctly installed in my python packages. But when I try to import the necessary packages in python3 with this command : from OpenGL.GLUT import * I get a strange error.

enter image description here

I have searched on internet, but I couldn’t find any recent and working installation process.

Thank you in advance for your help.

Thomas.

tom3800
  • 99
  • 1
  • 3
  • 8

1 Answers1

6

See the: Unable to import opengl.gl in python on macos Check the second answer (the first will only fix OpenGL.GL but not OpenGL.GLUT).

You need to set:

fullName = "/System/Library/Frameworks/{}.framework/{}".format(name,name)

in the file OpenGL/platform/ctypesloader.py (the exact absolute location depends on your installation).

Yuval.

YuvGM
  • 414
  • 2
  • 6