0
votes

I am trying to flatten down 4 .py files and 2 .wav files into an exe.

I have py2exe, python 1.6 and pygame for python 1.6 installed. Here is my setup file.

from distutils.core import setup
import py2exe
import pygame
import snake
import food
import sys
sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT")
setup(console=['snakegame.py']) 

To compile I type "python setup.py py2exe"

When I try to run my exe in the dist folder, I am greeted with

C:\Users\Mattias\Desktop\Snake\dist>snakegame.exe
snakegame.exe:43: 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 "snakegame.py", line 43, in <module>
File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: mixer module not available
(ImportError: DLL load failed: The specified module could not be found.)
1
possible duplicate of Pygame.mixer module missing?sloth
Maybe unrelated, but do you have to use that old of a python version?ninMonkey
Whilst installing Py2Exe I had to use 2.6Zooty

1 Answers

0
votes

You should really upgrade from python 1.6 to 2.7.3,That should solve the problem.