1 Answer
0
For Windows with python 3.6:
import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "guifoo",
version = "0.1",
description = "My GUI application!",
options = {"build_exe": build_exe_options},
executables = [Executable("guifoo.py", base=base)])
from: http://cx-freeze.readthedocs.io/en/latest/distutils.html
Place the above code in setup.py.
Then, open the command prompt in that folder (Shift+Right-Click), and use the following command
python setup.py build
Then, in the folder 'build', you should find a folder with your .exe. If you want to move it, you MUST move the whole folder, not just the .exe