Answers for "mac ModuleNotFoundError: No module named '_tkinter'"

0

ModuleNotFoundError: No module named 'Tkinter'

try:
    # for Python2
    # sudo apt-get install python-tk 
    from Tkinter import *   ## notice capitalized T in Tkinter 
except ImportError:
    # for Python3
    # sudo apt-get install python3-tk 
    from tkinter import *   ## notice lowercase 't' in tkinter here
Posted by: Guest on November-07-2020

Code answers related to "mac ModuleNotFoundError: No module named '_tkinter'"

Python Answers by Framework

Browse Popular Code Answers by Language