How To Fix 'importerror: Cannot Import Name 'ttk'' In Python 3.6.8
I am trying to create a GUI for a Python program I wrote. For that I'd like to import ttk from the tkinter module, which (as far as I know) shouldn't require further installations
Solution 1:
You cannot use tkinter unless it is installed on your machine with Python 3.6.8. To check if tkinter is installed, go to the terminal (Command Prompt for Windows) and type the following command:
python -m tkinter
If this command opens a window displaying a simple Tk interface, that means it's installed correctly and you should be able to import the tkinter package in your program.
However, if it shows an error, I recommend reinstalling Python and make sure that you select TCL/TK and IDLE when it asks you for optional installations.
Let me know if that works.
Post a Comment for "How To Fix 'importerror: Cannot Import Name 'ttk'' In Python 3.6.8"