Try opening a command prompt and navigating to the folder you installed it. Then run it via flappybird.exe
(or whatever you titled it) and check that the error doesn't show up within your terminal. It sounds like it hits an error that crashes it, but immediately closes before you can read the error. Therefore running it from terminal allows it to have a window that doesn't disappear and it can print an error message there if there is one (this may only tell you errors during startup though, I'm not sure). I typically prefer to use a GUI that has a section of text that updates and I can use this to essentially "print" statuses of my compiled programs into this box, perhaps you could use a similar technique? Best of luck!
update
With your code I was able to compile it and run it with no problems (using cx-freeze). My setup.py file was:
import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
additional_modules = []
build_exe_options = {"includes": additional_modules,
"packages": ["pygame", "random", "sys", "pyglet"],
"excludes": ['tkinter'],
"include_files": ['icon.ico', 'res']}
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(name="Flappy Bird",
version="1.0",
description="Flap around",
options={"build_exe": build_exe_options},
executables=[Executable(script="flappybird.py", base=base)])
You can get your executable working if you
You may need to run the command again if it fails (something to do with trying to read from a folder it hasn't made yet).
- Now you have a new folder
build
and your executable is inside it!