Search code examples
pythonuser-interfacecommand-promptpy2exe

How do I stop the command prompt from appearing when I run my Python executable?


I compiled a Python GUI program using py2exe, and it works, but when I run it the command prompt appears in addition to my program window. I have read that I should change the python.exe file to the pythonw.exe file, but there isn't even a Python.exe file in the dist folder to begin with. Compiling a .pyw version of the file also does not fix this. How would I prevent this from happening?


Solution

  • Duplicate

    You didn't post any code (which you should do), but I suspect you're using "console" instead of "windows" in setup.py.