【问题标题】:python mixer.module dll load fail mixer module not avaiablepython mixer.module dll 加载失败混合器模块不可用
【发布时间】:2014-09-07 18:44:40
【问题描述】:

在我编译并执行程序后,首先一切正常。但是当我开始在 pygame 中使用音频(.wav)时,程序给了我一个错误:

C:\Users\Eduard\Desktop\test\test.exe:71
7: RuntimeWarning: use mixer: DLL load failed: Das angegebene Modul wurde nicht
gefunden.
(ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.)
Exception in Tkinter callback
Traceback (most recent call last):
File "Tkinter.pyc", line 1470, in __call__
File "test.py", line 788, in ok
File "test.py", line 717, in do_g
File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: mixer module not available
(ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.)

在我的程序中,我使用了来自 itertools 的模块 Tkinter、random、pygame 和 cycle。我没有在设置文件中提到它们,但我不知道这是否需要,所以这里也是设置文件:

from distutils.core import setup
import py2exe

setup(console=[{"script":"test.py"}],options={"py2exe":{"includes":["pygame"]}})

【问题讨论】:

    标签: python module installation py2exe


    【解决方案1】:

    之前被here问过。

    答案:阅读this pygame-hompeage 上的文章。

    【讨论】:

    • 这对我没有帮助。
    • 我明白了。对不起。更新了第二个链接。 (会在另一个线程中)
    • 你也看过这个吗? py2exe.org/index.cgi/OverridingCriteraForIncludingDlls ...你有没有做过任何研究?
    • 哦,我没找到。我必须在路径名中放什么?
    • 我不知道,我以前从未遇到过这个问题。我什至不知道这是否能解决问题。我现在没有时间,但你可以查看第 70 行的pygame\__init__.py。在那里你可能会找到一个 DLL 文件的路径......另外,你必须更改setup.py 的第 7 行的括号到缺少的 DLL 的名称。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-09
    • 1970-01-01
    相关资源
    最近更新 更多