I am trying to learn some visualization with MatPlotLib. But when I try to import library it gives me "tkinter" error. You can see below my code and error.
My Code:
import pandas as pd
import matplotlib.pyplot as plt
import sys
plt.plot([3,4,2,5,7],[7,3,5,4,1])
plt.show()
Error:
Traceback (most recent call last):
File "pda.py", line 5, in <module>
import matplotlib.pyplot as plt
File "C:\Python36\lib\site-packages\matplotlib\pyplot.py", line 113, in
<module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Python36\lib\site-packages\matplotlib\backends\__init__.py", line
60, in pylab_setup
[backend_name], 0)
File "C:\Python36\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 6, in <module>
from six.moves import tkinter as Tk
File "C:\Python36\lib\site-packages\six.py", line 92, in __get__
result = self._resolve()
File "C:\Python36\lib\site-packages\six.py", line 115, in _resolve
return _import_module(self.mod)
File "C:\Python36\lib\site-packages\six.py", line 82, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'tkinter'
I try to install tkinter but it's good and update. If anyone can give me idea what's this error, I will be very happy. Thanks.