No tkinter package available
In Python 2.7, the Tkinter package name is Tkinter
instead of the Python 3 tkinter
. When I look at your error, it seems that your matplotlib
is a Python 3 script.
If you have written matplotlib
(at /usr/local/lib64/python2.7/site-packages/matplotlib/backends/backend_tkagg.py
) yourself (and it is written for Python 2.7), change line 6 from
from six.moves import tkinter as Tk
to
from six.moves import Tkinter as Tk
or a more version-friendly:
try: from six.moves import tkinter as Tk # print('Python 3')except ImportError e: from six.moves import Tkinter as Tk # print 'Python 2.7'
If you haven't written matplotlib
yourself, find a different install(er) for Python 2.7. If this doesn't work, use the fix above and report the issue by contacting the administrator of matplotlib
.