Python with Catalina : No module named 'OpenGL'

I am running the examples provided by the PyQtGraph python graphic module, on a MacOS Catalina. They all work fine for me, except those in 3D. I have a message :

Traceback (most recent call last):
  File "/Applications/anaconda3/lib/python3.7/site-packages/pyqtgraph/examples/GLVolumeItem.py", line 11, in <module>
    import pyqtgraph.opengl as gl
  File "/Applications/anaconda3/lib/python3.7/site-packages/pyqtgraph/opengl/__init__.py", line 1, in <module>
    from .GLViewWidget import GLViewWidget
  File "/Applications/anaconda3/lib/python3.7/site-packages/pyqtgraph/opengl/GLViewWidget.py", line 2, in <module>
    from OpenGL.GL import *
ModuleNotFoundError: No module named 'OpenGL'

The OpenGL module, though deprecated in Catalina, is present at the location(I checked)

/System/Library/Frameworks/OpenGL.framework

but I have no clue about how to make python find it. Does anyone have ?

Thanks a lot !!


You need a python library, not the system framework.

The standard OpenGL python library is PyOpenGL. However, that seems to be different from the library requested by the code.

If you installed PyQtGraph correctly, that should install everything you need.