This post has NOT been accepted by the mailing list yet.
I'm trying to run a Python script that uses tkinter to create a GUI and matplotlib to display a graph onto the GUI. Our System Administrators installed Python 3.5, tkinter, and matplotlib onto a Redhat Linux 7.2 machine. Within the code of our script, to import all necessary matplotlib functions and modules, we call:
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
from matplotlib.figure import Figure
However, when the script is ran, this is the result:
File "ourScript.py", line 17, in <module> from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
File "/opt/rh/rh-python35/root/usr/lib64/python3.5/site-packages/matplotlib/backends/backend_tkagg.py", line 11, in <module> import matplotlib.backends.tkagg as tkagg
File "/opt/rh/rh-python35/root/usr/lib64/python3.5/site-packages/matplotlib/backends/tkagg.py", line 2, in <module> from matplotlib.backends import _tkagg
ImportError: cannot import name '_tkagg'
After doing some research, it seems that this could be due to matplotlib being installed before tkinter. Is this likely the case?