After creating a game using python 2.7, I tested the game and it worked flawlessly without any bugs. Deciding that I wanted to redistribute it to a few of my friends I looked up some info on what I would have to do and eventually found py2exe. After carefully following all of the directions and creating my .exe, it failed to run. Running it through command line I got the following errors:
[spoiler]footBallHell.exe:1: RuntimeWarning: import display: No module named _view
(ImportError: No module named _view)
footBallHell.exe:1: RuntimeWarning: import draw: No module named _view
(ImportError: No module named _view)
footBallHell.exe:1: RuntimeWarning: import image: No module named _view
(ImportError: No module named _view)
footBallHell.exe:1: RuntimeWarning: import pixelcopy: No module named _view
(ImportError: No module named _view)
footBallHell.exe:1: RuntimeWarning: import transform: No module named _view
(ImportError: No module named _view)
Traceback (most recent call last):
File "footBallHell.py", line 218, in <module>
File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: display module not available
(ImportError: No module named _view)[/spoiler]
(Although I'm sure it's obvious, the name of my program is footBallHell.)
So, clueless as to what to do next I searched up google and found this similar problem on the python forums:
http://www.python-fo...hp?f=15&t=26719
After reading that I dug around through the Python folder and went to:
C:\Python27\Lib\site-packages\pygame
and found a file listed as "_view.pyd"
I believed that this was the file in question that was missing so I copied it into the dist folder hoping it would solve the problem. Unfortunately, it didn't. So, afterwards I went and added it into the directory with the rest of the relevant files as well as the setup.py program I used to create the executable so the program read as follows:
from distutils.core import setup
import py2exe
setup(console = ["footBallHell.py"],
author="XXXX",
author_email="XXXX",
data_files=[('.', ["attack.ogg",
"enemy.gif",
"Field.gif",
"football.gif",
"player.gif",
"save.ogg",
"tackle.ogg",
"freesansbold.ttf",
"_view.pyd"]
)]
)
After running the setup.py program, it did include the _view.pyd file in the dist folder, but still would not run.
So, I believe I either have the wrong file or there is something else I need to do in order to get the program to run. What I am asking is if there is any one out there that might know how to fix this issue, or, at worst, inform me of another way I can create an executable for Windows out of my python programs that I can distribute to my friends.