繁体   English   中英

在 macOS Big Sur 上安装 PyOpenGL

[英]PyOpenGL installation on macOS Big Sur

我正在尝试在我的 MacBook Pro 16" 上安装 PyOpenGL,以便在大学进行远程学习。我正在运行 macOS Big Sur 但是我读到此操作系统版本可能会导致 OpenGL 出现问题。

我试过这个命令进行安装:

pip3 install PyOpenGL PyOpenGL_accelerate

一切似乎都正确安装在我的 python 包中。 但是当我尝试使用以下命令在 python3 中导入必要的包时: from OpenGL.GLUT import *我收到一个奇怪的错误。

在此处输入图像描述

我在互联网上进行了搜索,但找不到任何最近且有效的安装过程。

预先感谢您的帮助。

托马斯。

See the: Unable to import opengl.gl in python on macos Check the second answer (the first will only fix OpenGL.GL but not OpenGL.GLUT).

你需要设置:

fullName = "/System/Library/Frameworks/{}.framework/{}".format(name,name)

在文件 OpenGL/platform/ctypesloader.py 中(确切的绝对位置取决于您的安装)。

尤瓦尔。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM