[Mac OS BigSur] FSLeyes: Unable to load OpenGL library
See original GitHub issueRecently, I updated my Mac OS from Mojave(10.14.6) to Mac OS Big Sur (11.4). In doing so, I am unable to open FSLeyes in AxonDeepSeg
I get the following OpenGL issue: Unable to load OpenGL library. Log is below:
log
Using TensorFlow backend.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING __init__.py 637: create - GLContext callback function raised ImportError: ('Unable to load OpenGL library', 'dlopen(OpenGL, 10): image not found', 'OpenGL', None)
Traceback (most recent call last):
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 38, in GL
mode=ctypes.RTLD_GLOBAL
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/ctypesloader.py", line 36, in loadLibrary
return _loadLibraryWindows(dllType, name, mode)
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/ctypesloader.py", line 89, in _loadLibraryWindows
return dllType( name, mode )
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/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 "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/fsleyes/gl/__init__.py", line 631, in create
ready()
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/fsleyes/main.py", line 579, in realCallback
fslgl.bootstrap(namespace.glversion)
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/fsleyes/gl/__init__.py", line 301, in bootstrap
import OpenGL.GL as gl
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/GL/__init__.py", line 3, in <module>
from OpenGL import error as _error
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/error.py", line 12, in <module>
from OpenGL import platform, _configflags
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 36, in <module>
_load()
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 33, in _load
plugin.install(globals())
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 97, in install
namespace[ name ] = getattr(self,name,None)
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
value = self.fget( obj )
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 62, in GetCurrentContext
return self.CGL.CGLGetCurrentContext
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
value = self.fget( obj )
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/darwin.py", line 45, in CGL
def CGL(self): return self.GL
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
value = self.fget( obj )
File "/Users/vasudevsharma/anaconda3/envs/ads_venv/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)
Platform :
- OS: Mac OS Big Sur (11.4)
- AxonDeepSeg version number: latest
master
branch
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
ImportError: ('Unable to load openGL library'), MacOS Catalina ...
I installed fsleye with pip , because I don't want to use conda , then got the error, did some research, upgraded cpython...
Read more >FSL Archives - JISCMail
... to macOS Big Sur and when I tried to run fsleyes I got this message (among others): ImportError: ('Unable to load OpenGL...
Read more >Unable to import opengl.gl in python on macos - Stack Overflow
I'm running macOS Big Sur beta (20A5343i); I'm using python 3.8.5; I installed opengl using pip: pip3 install PyOpenGL PyOpenGL_accelerate.
Read more >GUI not working on MacOS Big Sur 11.0.1 - Google Groups
GUI not working on MacOS Big Sur 11.0.1 ... ImportError: ('Unable to load OpenGL library', 'dlopen(OpenGL, 10): image not found', 'OpenGL', ...
Read more >fsleyes release history — FSLeyes 1.5.0 documentation
Fixed an issue on macOS / Big Sur whereby an image specified on the command-line could be loaded twice (!285). Fixed some rendering...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This solution works amazingly well.
Here was the solution I think: https://stackoverflow.com/questions/63475461/unable-to-import-opengl-gl-in-python-on-macos