Executable Python Apps on Windows/MacOS using TKinter - Python Tutorial (2020) #21

preview_player
Показать описание
LINK to RANDOM WINNER Python Program

PyInstaller freezes (packages) Python applications into stand-alone executables, under Windows, GNU/Linux, Mac OS X, FreeBSD, Solaris and AIX.

PyInstaller’s main advantages over similar tools are that PyInstaller works with Python 2.7 and 3.5—3.7, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility
Check our list of Projects using PyInstaller.
pip install pyinstaller

#python2020 #tkintergui #madaboutpython
Рекомендации по теме
Комментарии
Автор

Saving the python script as '.pyw' file instead of '.py' will remove command window.

amankumar-imkk
Автор

So how you gonna run this in your friend's computer ?

wickedsnuk
Автор

adding --noconsole you can remove the command prompt (the black window)

Автор

this doesnt work on my macos terminal: pip install pyinstaller. I'm already on the macos big sur

vl
Автор

Does the machine require Python runtime or it is included in the package?

mingzhu
Автор

I converted .py to exe using auto-py-to-exe module but the problem is size of exe is quite huge even when I'm not using any unnecessary modules in the program. Is there any clean method to reduce the size of the exe files, I checked few methods like nutika, upx, cython and stuff but the question is which one is the fastest and cleanest?

overrevvv
Автор

How to remove the command window in 2023: go to the .spec file (visible on the video at 5:10) of your application after the creation and change the "console=True" variable to "console=False". Then in your terminal, run "pyinstaller your_file.spec" where you replace "your_file" with your python file name WITHOUT the .py behind it, so JUST the filename

bramvanreusel
Автор

Tkinter with PyInstaller in MacOS is not as straight forward as in Windows. It is a known bug. Edit the title make it only "Windows"

ammarrashed
Автор

What are the exact commands for MAc. how did you get that apple.ico ? what is the source for it?

farjadzafar
Автор

Any idea how to get rid of the black screen yet?

shaedmorgan
Автор

write -w or -windowed in your `pyinstaller --onefile -w --icon=sample.ico example.py` to get rid of the terminal that pops up with your application gui

tomtommyle