0

How do I convert the following files into one executable?

  1. A main.py file that imports five other python scripts
  2. Five python scripts that each have their own GUI
  3. A background image is used in the main.py file

I am using Python 3.5.2. I have tried py2exe, cx_Freeze and pyinstaller but none seem to work, or I am doing something very wrong. Please could you help with clear steps.

It seems I have to downgrade to Python 3.4 in order to convert successfully but I don't really want to downgrade.

I am using tkinter for GUI and the Python math module for rounding-off numbers.

Cigar Fox
  • 25
  • 1
  • 7
  • It would be helpful if you added an explanation what excactly didn't work. I normally use cx_Freeze and it works well with tkinter numpy matplotlib etc. I also don't understand what you mean with "each have their own gui". Do you start several Tk() instances? – Jannick Jan 06 '17 at 16:49
  • Do the steps at http://stackoverflow.com/questions/17907258/how-do-i-compile-my-python-3-app-to-an-exe cause an error message? If so, what does it say, and if not, what happens? – Cees Timmerman May 18 '17 at 16:12

1 Answers1

0

I've had some success with pyinstaller and a program using enaml (Qt backend) for the GUI.

For pyinstaller it helps to use the --debug option or make a .spec file and set debug=True. Also, pyinstaller has the option to make a single folder with an exe in the folder instead of a single exe, this might be easier to debug. You can distribute your single-folder programme by making a single-exe installer with software like InnoSetup.

xyzzyqed
  • 472
  • 4
  • 12