2

我尝试使用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.
4

1 回答 1

1

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

现在像往常一样小心在包管理器中搞乱它是破坏系统的简单方法。

于 2011-10-29T21:54:10.643 回答