user3514446
user3514446

Reputation: 77

PyInstaller not compiling with console window - not appying -w

I recently moved to a new PC and thus had to install the latest version of PyInstaller 3.6 (using pip).

Now, for some odd reason, when I try and compile an existing .pyw file (a GUI Tkinter app), it hides the console window, even though I'm not using the -w switch!

The simple command I'm running is:

pyinstaller pcAdmin.pyw -F

That's all. I know it's nothing in my python script as I even tried it with an earlier version, which compiled fine on my old machine, and it still removed the console window!

I use a lot of subprocess lines in my script and none of them work if the console windows not there.

Anyone have any ideas? It makes no sense to me...

Thanks, Chris.

Upvotes: 1

Views: 139

Answers (1)

jizhihaoSAMA
jizhihaoSAMA

Reputation: 12672

Read about the document about pyinstaller please.

As noted in the CPython tutorial Appendix, for Windows a file extention of .pyw suppresses the console window that normally appears. Likewise, a console window will not be provided when using a myscript.pyw script with PyInstaller.

So now,you should rename your pcAdmin.pyw file to pcAdmin.py And use pyinstaller -F pcAdmin.py in pyinstaller again.And the console will show.

You got it?

Upvotes: 1

Related Questions