无法导入 pyglet.media.avbin

发布于 2024-09-27 12:05:45 字数 726 浏览 3 评论 0原文

我的回溯如下:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

冬天旳寂寞 2024-10-04 12:05:45

正如我发现的那样,这个问题在 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.

淡淡の花香 2024-10-04 12:05:45

将 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, 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?

内心旳酸楚 2024-10-04 12:05:45

我在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文