Search code examples
pythonqtpyqt5pyinstaller

My Python application launches along with cli how to get rid of it


I have recently try to deploy my python application using inno-setup to build an installer. The application was been setup, but the application launches along with its own cli as shown in the below picture and when CLI is closed the application automatically closes how to get rid of this issue.

Languages Used: Python,PyQt5 Tools used for development: Qt Designer, Pyinstaller, Inno-setup Tools

image here

Thanks for your concern.


Solution

  • I assume you are using Windows.

    This is intended behaviour. If you don't the console to show up when executing a python script (tipically if it is a GUI) you have two solutions:

    • Use the .pyw extension instead of .py (w stands for "windowed"). This will execute your script with pythonw.exe instead of python.exe
    • Start your script with pythonw.exe