-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyInstaller and pip install locations - Package(s) not found: customtkinter #517
Comments
@BootsManOut CustomTkinter is not packaged automatically because it contains some non-python files. So that's why we have to add its folder in You may be facing other import errors because of different python versions installed. Use the version where customtkinter is installed. I will recommend you to use |
Okay, I can try that, but what can I do to find the correct path address, since "pip show customtkinter" is not working? |
@BootsManOut I think you have more than one python version installed. But you have installed customtkinter in a different version Y. You may be trying to get the module from version X where it is not installed. You can try to reinstall it properly via pip. |
@Akascape How is the fact that customtkinter is not in the same folder as pyinstaller related to the fact that I cannot run the command |
@BootsManOut If you are unable to find the customtkinter installed path then download the repository zip and extract it. Then you will get the customtkinter folder inside it, just copy its path and use it in |
@Akascape Is this the correct format for it?: --add-data "C:\Users\Username\OneDrive\Desktop\App Files\customtkinter/customtkinter;customtkinter/" or does it need to be : --add-data "C:/Users/Username/OneDrive/Desktop/App Files/customtkinter/customtkinter;customtkinter/" or this: --add-data "C:/Users/Username/OneDrive/Desktop/App Files/customtkinter/customtkinter/" |
@BootsManOut What I mean to say is that if Pyinstaller is installed in version X, it will collect modules from only version X. You have customtkinter in version Y, so it will not be able to import it from Y. Thats how Pyinstaller works. |
@BootsManOut I guess third one seems right, but you can get the proper path by clicking the folder properties. Copy that only. |
Well I was able to export the app together with CTkinter the way I usually export apps, but when I run the app it gives me an error file that it could not find the json files that are used to set the color theme in CTkinter. And that error is called from within the CTkinter script, which means it has succesfully been included by pyinstaller into the exe file. |
@BootsManOut Otherwise use Auto-py-to-exe, you can easily browse and choose the folders/files. Highly recommended. |
If you do
And run your program with:
And then this should also work:
|
You would install pyinstaller like:
And use it like this:
(note the camel case spelling, for whatever reason) |
Yes, that's what I needed thanks @TomSchimansky . I got the correct path this way. Installing auto py installer besides not solving the issue, would have just taken away my time. Now after the json files are included in the exe file, I get another issue with the setuptool module that's used with Ctkinter:
Possibly related to this topic. What can I do in this situation? Do you think there's a chance you'll ever look into a making the module needing less dependencies for easier export? |
Maybe you just need pip install pyinstaller? |
It works now! In any case, thank you very much for your help, @TomSchimansky, I'm happy it works now! Your UI makes the app look so much more professional! |
Hello,
I cannot follow the wiki tutorial for creating the exe file with pyinstaller.
I try to do it via the console directly.
Already when I run
pip show customtkinter
in the console, I get the message: "WARNING: Package(s) not found: customtkinter"
And using the suggested commands with the path to the location of where customtkinter is installed does not work either.
(e.g.: pyinstaller --noconfirm --onedir --windowed --add-data "C:\Users\Username\OneDrive\Desktop\App Files\customtkinter/customtkinter;customtkinter/" main.py or pyinstaller --noconfirm --onedir --windowed --add-data "C:\Users\Username\OneDrive\Desktop\App Files/customtkinter;customtkinter/" main.py)
What can I do to make this work?
I never had issues exporting tkinter apps with other libraries, but I'm not able to make this work in CTkinter, because of the json files.
(btw. I didn't plan to report this, but I might as well mention it here: the dropdown_fg_color argument for the CTkCombobox is not recognized, despite being mentioned in the wiki documentation).
The text was updated successfully, but these errors were encountered: