CustomTkinter: PyInstaller and pip install locations - Package(s) not found: customtkinter

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).

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

It works now! So since I had Python 3.9 installed, first I completely re-installed Python as version 3.10.8, and then I updated all the modules of my project, and also updated pip, and then I also ran all the commands you suggested to update pyinstaller etc. And now it works. Btw. I used this command for the exe creation: pyinstaller --noconfirm --onefile --windowed --add-data "C:\Users\USERNAME\AppData\Local\Programs\Python\Python310\Lib\site-packages/customtkinter;customtkinter/" --hidden-import=setuptools --hidden-import=_distutils --icon=images/title.ico main.py So the “onefile” parameter actually worked perfectly fine without problem, despite being mentioned in the wiki that it wouldn’t work for the json files.

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!