Since I recently updated my Mac to Big Sur I keep having errors when trying to run a python program, more specifically with OpenGL. To be specific, I get these two errors:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 38, in GL
mode=ctypes.RTLD_GLOBAL
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/ctypesloader.py", line 36, in loadLibrary
return _loadLibraryWindows(dllType, name, mode)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/ctypesloader.py", line 89, in _loadLibraryWindows
return dllType( name, mode )
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: ('dlopen(OpenGL, 10): image not found', 'OpenGL', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bluesky.py", line 115, in <module>
main()
File "bluesky.py", line 105, in main
raise error
File "bluesky.py", line 76, in main
bs.init(mode, discovery=discovery, cfgfile=cfgfile, scnfile=scnfile)
File "/Users/Sanjay/Downloads/bluesky-master-10/bluesky/__init__.py", line 50, in init
from bluesky.navdatabase import Navdatabase
File "/Users/Sanjay/Downloads/bluesky-master-10/bluesky/navdatabase/__init__.py", line 1, in <module>
from .navdatabase import Navdatabase
File "/Users/Sanjay/Downloads/bluesky-master-10/bluesky/navdatabase/navdatabase.py", line 4, in <module>
from .loadnavdata import load_navdata
File "/Users/Sanjay/Downloads/bluesky-master-10/bluesky/navdatabase/loadnavdata.py", line 12, in <module>
from .load_visuals_txt import load_coastline_txt, navdata_load_rwythresholds
File "/Users/Sanjay/Downloads/bluesky-master-10/bluesky/navdatabase/load_visuals_txt.py", line 45, in <module>
from bluesky.ui.polytools import PolygonSet, BoundingBox
File "/Users/Sanjay/Downloads/bluesky-master-10/bluesky/ui/polytools.py", line 3, in <module>
import OpenGL.GLU as glu
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/GLU/__init__.py", line 2, in <module>
from OpenGL import platform
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 36, in <module>
_load()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 33, in _load
plugin.install(globals())
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 97, in install
namespace[ name ] = getattr(self,name,None)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
value = self.fget( obj )
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 62, in GetCurrentContext
return self.CGL.CGLGetCurrentContext
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
value = self.fget( obj )
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 45, in CGL
def CGL(self): return self.GL
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
value = self.fget( obj )
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 41, in GL
raise ImportError("Unable to load OpenGL library", *err.args)
ImportError: ('Unable to load OpenGL library', 'dlopen(OpenGL, 10): image not found', 'OpenGL', None)
I have tried to see where the issue is by using another proposed solution (first answer) on this forum as described here: Unable to import opengl.gl in python on macos
However, I am not sure if I have done this with the correct file path. Could someone indicate what the filepath in my case would be? Thanks a lot!