我尝试使用sudo python setup.py install和sudo 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.