-
I really like customtkinter and the design is so good but I'm trying to make the project public and the program is so simple but there are all of these files tcls and libraries and many other things |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
@zSynctic I know what the problem is, you want to provide a clean looking executable version of your program but pyinstaller is packing too much files in the package. First of all use the latest pyinstaller only, there are some few bugs recently fixed in the latest version. Solution 1 Do a fresh installation of a different python version on your system and download only the required modules that your python program needs like customtkinter and pyinstaller. Use pyinstaller in that version to make your executable. Solution 2 If you use Solution 3 Even after you remove some unnecessary folders, there will still be lots of files in that package. If you want to give a cleaner version then use a (Note: You may have to sign the installer otherwise it may show false positives by antiviruses in many cases (specially windows defender). Its because of those unsigned Solution 4 If you don't want to use installers but still want to give a clean executable, then use the This is what I like to use every time, there is no need to sign the exe. To my experiments, I never got any false positives (by antiviruses) with the one-file mode. Conclusion That's all the solutions I came up with. There are still some limitations though. Hope it will help, please mark this as answer if you are satisfied. |
Beta Was this translation helpful? Give feedback.
-
@zSynctic Yes, the one-file mode works with customtkinter, I have built my own customtkinter app in one-file mode only. First make sure to add this function in you main python code for the assets/images you use.
Then use it like this for every asset: Suppose this is your asset variable
Then change it to this:
We are doing this because in one-file it will have to search the assets within the temp folder only. How to make the One-File executable I will recommend you to use Auto-py-to-exe which is a interface for Pyinstaller. It will make the work easier for you. So first choose the py file in the You can then choose the icon.ico file for your program in the The next section is very important, In the Then under the Thats all you have to do, then just click on Tip: I will recommend you to also use an advanced option under the This is the whole process I use to make my applications. |
Beta Was this translation helpful? Give feedback.
@zSynctic I know what the problem is, you want to provide a clean looking executable version of your program but pyinstaller is packing too much files in the package.
I have researched a lot about pyinstaller and I have the possible solutions for you.
First of all use the latest pyinstaller only, there are some few bugs recently fixed in the latest version.
Solution 1
Do a fresh installation of a different python version on your system and download only the required modules that your python program needs like customtkinter and pyinstaller. Use pyinstaller in that version to make your executable.
By this, unnecessary cache and modules will never be included.
Solution 2
If you use
one-folder
…