π€ Have you ever encountered an error when creating an executable of your Tkinter app?
π¨βπ» I faced a similar issue where some windows were not showing up. After some investigation, I discovered that the problem was due to the absence of the Tkinter library in the executable file.
π Luckily, the solution was simple. By running the command pyinstaller --onefile --hidden-import tkinter hello.py
when creating the executable, I was able to include the missing library and resolve the issue. Hope this tip helps fellow Tkinter developers out there!
Options
π --onefile
is to just creating a .exe file
π --hidden-import <library>
is for import the libray
π -w
is for not showing the console when the executable runs
Top comments (0)