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

2024-09-26 22:13:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在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,但它不起作用

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


Tags: ornameinfromimportselfrawopengl

热门问题