0

I have generated python exe using py2exe but getting cmd window when I run my program. I have changed my files from .py to .pyw and again generated .exe file but I am still getting cmd window. How to generate exe that doesnot show cmd. Note I am using Tkinter in my code.

Thanks

Fouzan Javed
  • 37
  • 1
  • 5

1 Answers1

0

There is a simple way of doing it in Python:

  1. Change your directory with cd into this one where your desired .py file is.
  2. Pip install Pyinstaller.
  3. when you succeeded typing following line: pyinstaller.exe --onefile -w NAME.py and hit enter. NAME is the name of your specific py file.
  4. Now have a look in your chosen directory where are new files created. Look for the exe file which should be in the Dist folder. Just copy paste it where ever you want and delete the rest.

Still questions?

Just watch this video.

Timus
  • 10,974
  • 5
  • 14
  • 28
Raiko
  • 1
  • I thought I could help you with getting the markdown formatting right (getting whitespace and newlines right is a little challenge for new users). But looking at the post as you saw it while editing shows that you did not even try for more readable formatting. So I will respect your decision. - - Or check here https://stackoverflow.com/editing-help – Yunnosch Dec 03 '20 at 10:23