import matplotlib.pyplot as plt File "/home/caojl/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/home/caojl/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup [backend_name], 0) File "/home/caojl/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 4, in <module> from . import tkagg # Paint image to Tk photo blitter extension. File "/home/caojl/lib/python3.6/site-packages/matplotlib/backends/tkagg.py", line 5, in <module> from six.moves import tkinter as Tk File "/home/caojl/lib/python3.6/site-packages/six.py", line 92, in __get__ result = self._resolve() File "/home/caojl/lib/python3.6/site-packages/six.py", line 115, in _resolve return _import_module(self.mod) File "/home/caojl/lib/python3.6/site-packages/six.py", line 82, in _import_module __import__(name) File "/home/caojl/lib/python3.6/tkinter/__init__.py", line 36, in <module> import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'