I have created a Executable file through pyinstaller. To generate Executable file I am using below command in virtual environment:
pyinstaller --onefile imp.py
Note: the Executable file contains Tkinter code
Once I click on the file to execute it, It popup with 2 screen, one is Black Screen and Other is Tkinter Screen (Refer below Image for the same)
Output for Executing imp.exe file as below Image:

Question: How can I hide the black screen which you can see in above Image? (It should not be visible when I execute the Executable file, I want to showcase only tkinter Window)
Thanks for replies. It will be very helpful for me if someone guide me on this.
You need to add the --noconsole flag to your pyinstaller command:
pyinstaller --onefile --noconsole imp.py
This will make so that the black terminal window will never appear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With