Getting rid of console output when freezing Python programs using Pyinstaller

dfreeze picture dfreeze · Jul 11, 2013 · Viewed 63.5k times · Source

I have recently written a fairly simple program for my grandfather using Python with GUI from Tkinter, and it works beautifully for what he will be using it for. However, there is, of course, the ugly console output window. I have successfully gotten rid of it by simply changing the extension of the file from .py to .pyw. When I freeze it using PyInstaller, it reappears again! Is there any way for me to fix this?

Thanks in advance.

Answer

Stephan picture Stephan · Jul 11, 2013

If you want to hide the console window, here is the documentation: This is how you use the --noconsole option

python pyinstaller.py --noconsole yourscript.py

If you need help using pyinstaller to get to the point where you need to use the --noconsole option here is a simple tutorial for getting there.