CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Packaging into a single .exe file

Open JoakimBrandt opened this issue 3 years ago • 5 comments

Hello,

I am wondering if it is possible to use CustomTkinter for single bundled .exe files? I have tried using the instructions here, but I can't seem to find a way to get my python script into a single .exe file. I want to know if it is an impossible task and I should just use the standard tkinter instead?

JoakimBrandt avatar Nov 17 '22 16:11 JoakimBrandt

I don't know if this is a dumb question of mine, but have u already tried pyinstaller with --onefile command?

notluxca avatar Nov 18 '22 00:11 notluxca

@JoakimBrandt This may help: https://github.com/TomSchimansky/CustomTkinter/discussions/423#discussioncomment-3549223

Akascape avatar Nov 18 '22 05:11 Akascape

Hello,

I am wondering if it is possible to use CustomTkinter for single bundled .exe files? I have tried using the instructions here, but I can't seem to find a way to get my python script into a single .exe file. I want to know if it is an impossible task and I should just use the standard tkinter instead?

Use pyinstaller

pyinstaller --noconfirm --onedir --windowed --add-data "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\site-packages\customtkinter;customtkinter/" yourpythonfile.py

clxakz avatar Dec 10 '22 19:12 clxakz

I was able to do this by updating pyinstaller and also using: --add-data "G:/Projects/MyApp/venv/Lib/site-packages/customtkinter;customtkinter/" Updating Pyinstaller: https://www.pythonguis.com/tutorials/packaging-tkinter-applications-windows-pyinstaller/

IagoBeuller avatar Jan 28 '23 16:01 IagoBeuller