python - 无法在 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
尝试了这个解决方案,但它不起作用。
有谁知道如何解决这个错误?
解决方案
推荐阅读
- prestashop-1.7 - 有没有人有 PrestaSharp 如何添加产品的示例?
- flutter - 如何自定义 Stack 高度 Flutter
- database - Flyway 命令行:无效参数:-placeholders
- python - 在 DRF 中使用 Django 频道进行实时聊天
- c# - 如何识别自引用循环?
- java - 在 android studio 中膨胀类 com.google.android.gms.ads.AdView 时出错
- performance - 删除未使用的代码 Google Page Speed 和其他错误
- perl - 在数组 perl 中按数字和字母顺序对数字进行排序
- javascript - “toUpperCase”的问题,它输出“function toUpperCase() { [native code] }”而不是所需的输出。达到某个值时使循环停止
- python - 为什么 np.ma.array 采用倒置掩码?