CustomTkinter is a Python UI library based on Tkinter, designed to create modern-looking and fully customizable graphical user interfaces. It provides a consistent and aesthetically pleasing experience across Windows, macOS, and Linux platforms, enhancing standard Tkinter widgets with advanced styling. The library is actively developed, with its current version being 5.2.2.
pip install customtkinterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This quickstart initializes a basic CustomTkinter window, sets the appearance mode and color theme, and adds a centered button that prints a message when clicked.
Review the official migration guide for v5.0.0. Update font attribute names from `text_font` to `font`. Change `fg_color=None` to `fg_color='transparent'` for transparent elements. Custom theme files will need to be re-structured to the new JSON format.
Ensure your IDE is configured to use the correct Python interpreter associated with your virtual environment where CustomTkinter is installed. Always use `import customtkinter` (lowercase 'c') and refer to classes with the `customtkinter.` prefix (e.g., `customtkinter.CTk`).
Install Pillow using `pip install Pillow` if you plan to use images in your CustomTkinter application.
If encountering issues related to the underlying GUI framework, ensure Tcl/Tk development packages are installed on your operating system (e.g., `sudo apt-get install python3-tk` on Debian/Ubuntu, or `brew install tcl-tk` on macOS for Homebrew Python).
Ensure `customtkinter` is installed using `pip install customtkinter`. If using a virtual environment or IDE (like VS Code or PyCharm), verify that the correct Python interpreter associated with the installed package is selected.
Correct the capitalization to `customtkinter.CTk()` and ensure your Python script is not named `customtkinter.py` or any name that conflicts with the library's module name.
Verify the method name is correctly spelled and capitalized as `customtkinter.set_appearance_mode()`. Also, check that your Python script file is not named `customtkinter.py`.
Always call a geometry manager (e.g., `widget.pack()`, `widget.grid()`, or `widget.place()`) after creating a widget. Ensure consistent use of geometry managers within the same container. Consider updating CustomTkinter and Python to their latest stable versions, and be aware of potential display issues on Linux with desktop scaling, sometimes resolvable by using a virtual environment or switching Python versions.
When creating a `customtkinter` variable (e.g., `IntVar`), ensure you pass a valid master widget (like the main application window) as the first argument, or use the `value` keyword for the initial value. For example, `my_var = customtkinter.IntVar(master=app, value=0)`.
No traffic data recorded yet.