How do I create an all in one exe file from cx_freeze (or installer) from python 3.3

mad5245 picture mad5245 · Feb 20, 2013 · Viewed 8.1k times · Source

I have made a GUI python script that I would like to share with my coworkers to improve productivity. I need a way to include everything in one file/directory for them to use. I tried the standard

python setup.py build

But it does not contain everything (tested on their pc's and I just get a quick command prompt popup and then it closes.)

It works fine on my machine, but I have other things installed (like python for example)

My setup.py is as follows:

import sys
from cx_Freeze import setup, Executable

executables = [
        Executable("Blah.py")
]

buildOptions = dict(
        compressed = True,
        includes = ["Blah"],
        path = sys.path + ["modules"])

setup(
        name = "Blah",
        version = "0.1",
        description = "Blah",
        options = dict(build_exe = buildOptions),
        executables = executables)

I have spent hours searching already with no luck. I feel like there is a way to include all needed file, I am just not sure how. Any help would be appreciated. Thank you.

Answer

Sohrab T picture Sohrab T · Sep 24, 2015