I GOT IT WORKING!! I'm going to put all the info here that you need to know, as it's incredibly simple once you get it working.
First i'll explain my directory setup:
So i have: src\game\main.py. in source, i have a music, graphics, game and data folder. I have all my .py files in the game folder, and the others are self explanatory. Also inside the source folder is a RGB.py (RGB is the name of my game) and ALL THIS DOES is execute main.py in the game folder.
So it looks something like this:
games>main.py, stuff.py, etc.py
data> (log files and other stuff)
Now, PyInstaller 2.0 lets you use a .spec file, which you will HAVE to use to get this to work. I'll show mine, then explain it:
`# -*- mode: python -*-
base_path = 'C:\\RGB\\dist\\RGBpy'
a = Analysis([os.path.join(base_path, 'RGB.py')],
hiddenimports=['_codecs', 'encodings', 'encodings.aliases', 'encodings.codecs',
'encodings.encodings', 'encodings.__builtin__', 'encodings.utf_8'],
pyz = PYZ(a.pure)
exe = EXE(pyz,
pygame_files = [
('freesansbold.ttf', os.path.join(base_path, 'data', 'freesansbold.ttf'), 'DATA'),
game_files = 
with file(os.path.join(base_path, 'MANIFEST.in')) as f:
for line in f.readlines():
rest = line.split(' ')
base, pattern = os.path.split(rest)
for item in glob.glob(os.path.join(base_path, base, '*.*')):
_, name = os.path.split(item)
coll = COLLECT(exe,
a.datas + pygame_files + game_files,
Now, your .tff file is likely to not be detected, so thats where the pygame_files list comes in. My .tff file is in the data folder, so the 'data' you see is there for that. Ignore the 'DATA' in all caps.
The C:\RGB\dist\RGBpy you see is where my RGB.py is located and all the folders. I just renamed \src to \RGBpy. The location doesn't matter as long as the driver .py file (RGB.py) is in that location, along with everything else that you'll probably want imported.
Next is game_files, this is used as a workaround for manifest.in, which wouldn't work for me, but it might work for you, my manifest.in file is just a .txt file with .in on the end and it has
which should be pretty self explanatory.
Additional details include a pathex which is where the .exe will be unloaded. Which, when combined with
name=os.path.join('dist', 'RGB'), you get the .exe in RGB\dist\RGB.
The rest should be pretty self explanatory. To properly run it, save the MANIFEST.in in both the pysintaller main directory AND besides your driver.py (RGB.py) and .spec in the pysintaller dir. Then execute the following in windows command: python pyinstaller .spec. If python isn't added to your system path: http://stackoverflow.com/questions/4621255/how-do-i-run-a-python-program-in-the-command-prompt-in-windows-7.
ONE FINAL RULE THAT I MUST WARN YOU OF!! .pyc files. Pyinstaller will choose those of the exist. remove them before running pyinstaller!! It'll force your file imports to be static, causing all kinds of issues! That was my major roadblock several times. DELETE YOUR .PYC FILES!!
And that is all there is to it!! Good luck!!
(credit goes to paul paterson of perpetualpyramid.com for helping)