0

I've made a program in python/tkinter, used pyinstaller to make a standalone executable (.exe). However, when i run it command prompt opens as well as the program. Is the issue with python or pyinstaller?

Is there a way to avoid this?

Flimzy
  • 68,325
  • 15
  • 126
  • 165
Haukland
  • 581
  • 6
  • 20
  • 3
    have you tried the [`--noconsole`](https://pythonhosted.org/PyInstaller/usage.html#windows-and-mac-os-x-specific-options) command? – fhdrsdg Aug 29 '18 at 13:33
  • I used [cx freeze](https://pypi.org/project/cx_Freeze/) to compile my exe for python and it works fine with no command prompt. – Mike - SMT Aug 29 '18 at 17:03
  • Possible duplicate of [Getting rid of console output when freezing Python programs using Pyinstaller](https://stackoverflow.com/questions/17584698/getting-rid-of-console-output-when-freezing-python-programs-using-pyinstaller) – strava Aug 29 '18 at 17:29
  • You can also try changing extension `.py` to `.pyw`. – Black Thunder Aug 30 '18 at 08:52

1 Answers1

0

Just add --windowed or --noconsole to your pyinstaller statement:

    pyinstaller --windowed script.py
amunozo
  • 57
  • 7