My traceback is as follows:
C:\Romeo\Scripts>python
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyglet.media.avbin
Traceback (most recent call last):
File "&开发者_JAVA百科lt;stdin>", line 1, in <module>
File "C:\Romeo\lib\site-packages\pyglet\media\avbin.py", line 53, in <module>
darwin='/usr/local/lib/libavbin.dylib')
File "C:\Romeo\lib\site-packages\pyglet\lib.py", line 122, in load_library
raise ImportError('Library "%s" not found.' % names[0])
ImportError: Library "avbin" not found.
I'm running Windows 7 32-bit with dep disabled and avbin.dll in system32. Any suggestions are much appreciated!
This was discussed on the pyglet mailing list at some point, as I discovered, but in case other people look here for an answer, put the avbin.dll in your syswow64 folder on windows 64 versions. It's not clear why this should be the place given that to run pyglet you need to be using the 32 bit python and the the 32 bit avbin.dll, unless you compile it or use one of the ones Christoph Gohlke kindly compiles on his site: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyglet. But this is just one more bit of windows alchemy not given to us to know, I guess.
It is considered bad practice to copy your DLLs to system32
, that aside try copying it to <your_python_home>\DLLs
, presumably C:\Python27\DLLs
. You could also try C:\Python27\Lib\site-packages
.
Doesn't come this library with a "proper" install method taking care of this, e.g. running something like python setup.py install
?
I'm running 32 bit python 2.6 on windows 7 (64bit), and I have the same problem. The answers from knitti didn't work for me either. The only thing that worked was copying the avbin.dll to the directory where my .py file is.
精彩评论