python mixer.module dll加载失败混音器模块不可用

时间:2014-09-07 18:44:41

标签: python module installation py2exe

编译完程序并执行后,首先一切正常。但是当我开始使用带有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.)

在我的程序中,我使用模块Tkinter,random,pygame和itertools循环。我没有在设置文件中提及它们,但我不知道这是否是必要的,所以这里也是安装文件:

from distutils.core import setup
import py2exe

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

1 个答案:

答案 0 :(得分:0)

之前被问过here

答案:阅读游戏主页上的this文章。