On the problem of drawing with matplotlib under ubuntu

first of all,

import tkinter

and then the error is as follows:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named "tkinter"

but I"m already sudo apt-get install python3-tk.
Why can"t I find the module? Python3
is currently used, and then I draw a picture under matplotlib, which also reports this mistake.

import matplotlib.pyplot as plt

the error is as follows:

 import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_tkagg.py", line 4, in <module>
    from . import tkagg  -sharp Paint image to Tk photo blitter extension.
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/backends/tkagg.py", line 5, in <module>
    from six.moves import tkinter as Tk
  File "/usr/lib/python3/dist-packages/six.py", line 92, in __get__
    result = self._resolve()
  File "/usr/lib/python3/dist-packages/six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "/usr/lib/python3/dist-packages/six.py", line 82, in _import_module
    __import__(name)
ModuleNotFoundError: No module named "tkinter"

in short, I installed tkinter, and tcl/tk even if I couldn"t find tkinter,. I just couldn"t find it. I wasted a long time trying to solve it.

clipboard.png
I have already used apt-get install python3-tk, but I still can"t find tkinter


pip install tkinter


sudo apt-get install python3.6-tk

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2bbc4-33e6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2bbc4-33e6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?