# DP: suggest installation of python-tk package on failing _tkinter import --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -36,7 +36,10 @@ if sys.platform == "win32": # Attempt to configure Tcl/Tk without requiring PATH from tkinter import _fix -import _tkinter # If this fails your Python may not be configured for Tk +try: + import _tkinter +except ImportError as msg: + raise ImportError(str(msg) + ', please install the python-tk package') TclError = _tkinter.TclError from tkinter.constants import *