Answers for "import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'"

14

ModuleNotFoundError: No module named 'tkinter'

sudo apt-get install python3-tk
Posted by: Guest on June-09-2020
0

ImportError: No module named _tkinter, please install the python-tk package

sudo apt-get install python-tk
Posted by: Guest on December-10-2020
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 "import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language