Search code examples
pythonpyglet

Unable to import pyglet.media.avbin


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 "<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!


Solution

  • 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.