Pyglet:库“GL”未找到
我尝试使用 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.
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是你的显卡驱动程序有问题。您可以尝试为您使用的任何图形驱动程序安装开发包,查找名称中带有 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.