Python py2exe dll加载失败混音器模块不可用

时间:2014-09-19 17:14:48

标签: python module pygame exe py2exe

我尝试使用py2exe在python中使用我的programm创建一个exe。问题是,当我尝试运行exe时,它给了我一个错误:

C:\Users\Eduard\Desktop\testordner>test.exe
test.exe:7: RuntimeWarning: use mixer: DLL load failed: Das
angegebene Modul wurde nicht gefunden.
(ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.)
Traceback (most recent call last):
File "test.py", line 7, in <module>
mixer.init()
File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: mixer module not available
(ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.)

这也是我的setupfile:

from distutils.core import setup
import Tkinter as tk
from itertools import cycle
from pygame import mixer
import random
import py2exe

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

1 个答案:

答案 0 :(得分:0)

我的猜测是添加&#39; pygame&#39;在&#39;包中&#39;选项而不是&#39;包括&#39;。

如果上述还不够,我会用谷歌搜索pygame和py2exe&#39;