Pygame.mixer模块丢失了吗?

Kov*_*ova 2 python pygame py2exe python-2.7

我正在尝试为朋友制作一个小程序,它需要运行一个.wav文件,当我在python中运行它时工作正常但是当我在py2exe中编译它时它给了我这个 - >

phone.exe:23: RuntimeWarning: use mixer: DLL load failed: The specified module could not be found.
(ImportError: DLL load failed: The specified module could not be found.)
Traceback (most recent call last):
  File "phone.py", line 23, in <module>
  File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: mixer module not available
Run Code Online (Sandbox Code Playgroud)

Ign*_*ams 5

pygame.mixer依赖于libSDL_mixer.确保它可用.

  • 在Debian上,您可以使用“ apt-get install libsdl-mixer1.2”来安装libSDL_mixer。 (2认同)