2013-03-14 197 views
0

尝试的AMD64机器上使用pyglet1.2alpha1在FreeBSD下用python3.3,我得到蟒蛇找不到GL

$ python ~/.local/lib/python3.3/site-packages/pyglet/gl/gl_info.py 

Traceback (most recent call last): 
    File "~/.local/lib/python3.3/site-packages/pyglet/lib.py", line 111, in load_library 
    lib = ctypes.cdll.LoadLibrary(name) 
    File "/usr/local/lib/python3.3/ctypes/__init__.py", line 431, in LoadLibrary 
    return self._dlltype(name) 
    File "/usr/local/lib/python3.3/ctypes/__init__.py", line 353, in __init__ 
    self._handle = _dlopen(self._name, mode) 
OSError: Shared object "GL" not found, required by "python" 

During handling of the above exception, another exception occurred: 
[…] 
    File "~/.local/lib/python3.3/site-packages/pyglet/lib.py", line 118, in load_library 
    if ((self.linux_not_found_error not in o.message) and 
AttributeError: 'OSError' object has no attribute 'message' 

我已经运行glxgears(作品)测试了我的梅萨安装,我已经尝试了比较安装PyOpenGL(这不起作用,因为它取决于PIL,它不适合python3.3),并且为了确保在安装mesa-demosfreeglut后仍然重新安装python3.3,并且仍然没有改变。

python2.7,我得到了同样的错误

OSError: Shared object "GL" not found, required by "python2" 

(无During handling of the above exception, another exception occurred问题),还安装PyOpenGL后(其中工程如预期)。

这里有什么问题? pyglet如何运作?

回答

0

pyglet附带的各种python文件,并尝试加载外部资源测试明确,如果他们在Linux上运行。因此,他们没有在FreeBSD上评估正确的东西。当在下面列出的文件中用sys.platform.startswith('linux') or sys.platform.startswith('freebsd')代替sys.platform.startswith('linux')时,它似乎工作。

pyglet/lib.py 
pyglet/app/base.py 
pyglet/gl/__init__.py 
pyglet/image/codecs/__init__.py 
pyglet/input/__init__.py 
pyglet/media/drivers/openal/__init__.py