我尝试使用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"]}})
答案 0 :(得分:0)
我的猜测是添加&#39; pygame&#39;在&#39;包中&#39;选项而不是&#39;包括&#39;。
如果上述还不够,我会用谷歌搜索pygame和py2exe&#39;