I have a program written in Python 3.3
that needs to run on both PC's and Macs, preferably without requiring an installation of Python or any supporting modules. I know this question has been asked before, but I've tried py2exe
, py2app
, and cx_Freeze
to no avail. I'm relatively new to the programming world, so perhaps I'm doing something wrong. My program is composed of four .py
files containing GUI and logic classes, and it requires use of the xlrd, xlsxwriter, os.path, and tkinter modules.
The closest I've gotten to making this work is py2app
, which generated a .app
file that returned "GUI error" when run. Cx_Freeze
generated a .app
file that wouldn't run at all. I have both OS X 10.9
and Windows 8
at my disposal. Can someone break this down step by step, or refer me to a tutorial that does? Thank you very much for your help.
This is the simple setup.py file I used for cx_Freeze. I ran it with python3.3 setup.py bdist_mac
from the Terminal.
application_title = "Index Calculator"
main_python_file = "GUI.py"
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
includes = ["atexit","re"]
setup(
name = application_title,
version = "1.0",
description = "Calculates forest sustainability",
options = {"build_exe" : {"includes" : includes }},
executables = [Executable(main_python_file, base = base)])