Pyglet:库“GL”未找到

发布于 2024-12-12 14:21:36 字数 1089 浏览 1 评论 0原文

我尝试使用 sudo python setup.py installsudo apt-get install python-pyglet 安装 pyglet,但我没有运行一个简单的脚本。我使用的是 Ubuntu 11.10 64 位。

File "test.py", line 3, in <module>
window = pyglet.window.Window()
File "/usr/local/lib/python2.7/dist-packages/pyglet/__init__.py", line 306, in __getattr__
__import__(import_name)
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/__init__.py", line 133, in <module>
from pyglet.gl import gl_info
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/__init__.py", line 99, in <module>
from pyglet.gl.lib import GLException
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/lib.py", line 143, in <module>
from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/lib_glx.py", line 48, in <module>
gl_lib = pyglet.lib.load_library('GL')
File "/usr/local/lib/python2.7/dist-packages/pyglet/lib.py", line 122, in load_library
raise ImportError('Library "%s" not found.' % names[0])
ImportError: Library "GL" not found.

I tried installing pyglet with sudo python setup.py install and with sudo apt-get install python-pyglet but I had no luck running a simple script. I am with Ubuntu 11.10 64-bits.

File "test.py", line 3, in <module>
window = pyglet.window.Window()
File "/usr/local/lib/python2.7/dist-packages/pyglet/__init__.py", line 306, in __getattr__
__import__(import_name)
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/__init__.py", line 133, in <module>
from pyglet.gl import gl_info
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/__init__.py", line 99, in <module>
from pyglet.gl.lib import GLException
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/lib.py", line 143, in <module>
from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX
File "/usr/local/lib/python2.7/dist-packages/pyglet/gl/lib_glx.py", line 48, in <module>
gl_lib = pyglet.lib.load_library('GL')
File "/usr/local/lib/python2.7/dist-packages/pyglet/lib.py", line 122, in load_library
raise ImportError('Library "%s" not found.' % names[0])
ImportError: Library "GL" not found.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪冰清 2024-12-19 14:21:37

这可能是你的显卡驱动程序有问题。您可以尝试为您使用的任何图形驱动程序安装开发包,查找名称中带有 dev 和 fglrx(amd)、nvidia 或 mesa(开源) 之一的包。您可能还想安装 freeglut。

现在,一如既往地小心地乱搞包管理器,这是破坏系统的简单方法。

It's probably a problem with your graphics drivers. You could try installing the dev packages for whatever graphics driver you are using, look for packages with dev and one of fglrx(amd), nvidia or mesa(open source) in the name. You probably also want to install freeglut.

Now as always be careful messing around in the package manager it is an easy way to break your system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文