Pygame.mixer module missing?

2019-05-26 18:29发布

问题:

I am trying to make a small program for a friend and it needs to run a .wav file it works fine when i run it in python but when i compile it in py2exe it gives me this -->

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

回答1:

This might help: an example py2exe project : http://www.pygame.org/wiki/Pygame2exe



回答2:

pygame.mixer is dependent on libSDL_mixer. Make sure that it is available.