<div dir="ltr"><div dir="ltr"><div>I have python code that depends on the TkAgg matplotlib backend. I have upgraded and reinstalled all macports after upgrading to Mojave 10.14.4 following the migration instructions here <a href="https://trac.macports.org/wiki/Migration">https://trac.macports.org/wiki/Migration</a> and all seems to work fine, with the exception of the tkagg backend it can't seem to locate.</div><div><br></div><div>Before I mess anything up by force uninstalling and reinstallng py-tkinter, does anyone have suggestions on what else to try first?</div><div><br></div><div>Here's the exact error I get on trying to run this code:</div><div><br></div><div><div>[balt@:mymachine]$ /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7</div><div>Python 2.7.16 (default, Apr  1 2019, 14:50:41) </div><div>[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.3)] on darwin</div><div>Type "help", "copyright", "credits" or "license" for more information.</div><div>>>> import matplotlib</div><div>>>> matplotlib.use("TkAgg",warn=False, force=True)</div><div>>>> import matplotlib.pyplot as plt</div><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py", line 115, in <module></div><div>    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 63, in pylab_setup</div><div>    [backend_name], 0)</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 4, in <module></div><div>    from . import tkagg  # Paint image to Tk photo blitter extension.</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py", line 9, in <module></div><div>    from matplotlib.backends import _tkagg</div><div>ImportError: cannot import name _tkagg</div></div><div><br></div></div></div>