无法在 MacOS Big Sur 中从 OpenGL 导入 EGL

问题描述

我正在尝试从 macOS Big Sur(V11.1) 中的 OpenGL 导入 EGL,但出现以下错误

AttributeError                            Traceback (most recent call last)
<ipython-input-11-5eb4e30c9ff9> in <module>
----> 1 from OpenGL import EGL,GL

~/opt/miniconda3/envs/yt-git/lib/python3.8/site-packages/PyOpenGL-3.1.5-py3.8.egg/OpenGL/EGL/__init__.py in <module>
      1 """OpenGL.EGL the portable interface to GL environments"""
----> 2 from OpenGL.raw.EGL._types import *
      3 from OpenGL.raw.EGL._errors import EGLError
      4 from OpenGL.EGL.VERSION.EGL_1_0 import *
      5 from OpenGL.EGL.VERSION.EGL_1_1 import *

~/opt/miniconda3/envs/yt-git/lib/python3.8/site-packages/PyOpenGL-3.1.5-py3.8.egg/OpenGL/raw/EGL/_types.py in <module>
     85 EGL_DONT_CARE = -1
     86 
---> 87 raw_eglQueryString = _p.PLATFORM.EGL.eglQueryString
     88 raw_eglQueryString.restype = ctypes.c_char_p
     89 raw_eglQueryString.__doc__ = """Raw version of eglQueryString that does not check for availability"""

~/opt/miniconda3/envs/yt-git/lib/python3.8/ctypes/__init__.py in __getattr__(self,name)
    392         if name.startswith('__') and name.endswith('__'):
    393             raise AttributeError(name)
--> 394         func = self.__getitem__(name)
    395         setattr(self,name,func)
    396         return func

~/opt/miniconda3/envs/yt-git/lib/python3.8/ctypes/__init__.py in __getitem__(self,name_or_ordinal)
    397 
    398     def __getitem__(self,name_or_ordinal):
--> 399         func = self._FuncPtr((name_or_ordinal,self))
    400         if not isinstance(name_or_ordinal,int):
    401             func.__name__ = name_or_ordinal

AttributeError: dlsym(0x7f9b09fd9b50,eglQueryString): symbol not found

尝试了 this solution 但它不起作用。

有没有人知道如何解决这个错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)