4 つの .py ファイルと 2 つの .wav ファイルを exe にフラット化しようとしています。
python 1.6用のpy2exe、python 1.6、およびpygameがインストールされています。これが私のセットアップファイルです。
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'])
コンパイルするには、「python setup.py py2exe」と入力します
dist フォルダーで exe を実行しようとすると、
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.)