无法导入 pyglet.media.avbin
我的回溯如下:
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.
我正在运行 Windows 7 32 位,禁用了 dep,并且 avbin.dll 在 system32 中。非常感谢任何建议!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如我发现的那样,这个问题在 pyglet 邮件列表中的某个时候进行了讨论,但如果其他人在这里寻找答案,请将 avbin.dll 放在 Windows 64 版本上的 syswow64 文件夹中。目前尚不清楚为什么这里应该是这个地方,因为要运行 pyglet,您需要使用 32 位 python 和 32 位 avbin.dll,除非您编译它或使用 Christoph Gohlke 在他的网站上编译的其中之一: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyglet 。但我想,这只是我们不知道的 Windows 炼金术的又一点。
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.
将 DLL 复制到 system32 被认为是不好的做法,除此之外尝试将其复制到
\DLLs
,大概是C:\Python27\DLLs< /代码>。您也可以尝试
C:\Python27\Lib\site-packages
。这个库没有提供一个“正确的”安装方法来处理这个问题,例如运行
python setup.py install
之类的东西?It is considered bad practice to copy your DLLs to
system32
, that aside try copying it to<your_python_home>\DLLs
, presumablyC:\Python27\DLLs
. You could also tryC:\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
?我在 Windows 7(64 位)上运行 32 位 python 2.6,并且遇到同样的问题。 knitti 的答案对我来说也不起作用。唯一有效的是将 avbin.dll 复制到我的 .py 文件所在的目录。
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.