TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
10.84k stars 1.02k forks source link

AttributeError: module 'customtkinter' has no attribute 'CTk' #2320

Closed T011235 closed 3 months ago

T011235 commented 3 months ago

Hi, I tried 3 of your examples and always got an error regarding CTk and set_default_color_theme("blue"). Im using VS Code, Python 3.11.6 and customtkinter 5.2.2.

customtkinter.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green AttributeError: module 'customtkinter' has no attribute 'set_default_color_theme'

app = customtkinter.CTk() # create CTk window like you do with the Tk window AttributeError: module 'customtkinter' has no attribute 'CTk'

Akascape commented 3 months ago

@T011235 Did you rename some file as customtkinter.py?

T011235 commented 3 months ago

No, I haven't renamed any File. I created a new file with the name test.py. Which Python version do you use?

Akascape commented 3 months ago

@T011235 I use multiple python versions like 3.9, 3.10, 3.11 .. and no issue like this appears if you have properly installed customtkinter.

Recheck if there is any folder or file named as customtkinter.

Reinstall customtkinter, check the install location manually in python3.11>site_packages>lib>customtkinter.