1

I am packing my code to exe now. Successfully created setup.py , built it but my executable file opens and then closes. I noticed some text when it opens. What should I do so it doesn't close and I can read the error?

setup.py

import cx_Freeze

executables = [cx_Freeze.Executable('main.py')]

cx_Freeze.setup(
    name='Castle game',
    options={'build_exe': {'packages': ['pygame'],
                           'includes': ['random'],
                           'include_files': [...]}},
    executables=executables

)

There are plenty of files, so I put '...' instead of them.

  • You should probably try to improve your previous questions [here](https://stackoverflow.com/questions/60771248/why-my-exe-cx-freeze-closes-immediately-after-i-opened-it) and [here](https://stackoverflow.com/questions/60765308/python-pygame-and-cx-freeze) before posting new ones. – Corentin Pane Mar 20 '20 at 11:58

0 Answers0