<div><div dir="auto">solved:</div></div><div dir="auto"><br></div><div dir="auto">pip uninstall matplotlib</div><div dir="auto">pip install -U matplotlib</div><div dir="auto"><br></div><div dir="auto">now works</div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 6 May 2019 at 17:24, Balthasar Indermuehle <<a href="mailto:balt@inside.net">balt@inside.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div><br></div>Dr Balthasar Indermühle<br>Inside Systems Pty Ltd</span><div><span style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">17 Gottenham Street</span></div><div><span style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Glebe NSW 2037, Australia</span></div><div><span style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">t: <a value="+61427912856" style="color:rgb(17,85,204)">+61 4 2791 2856</a></span></div><div><font face="arial, sans-serif" color="#222222"><span style="border-collapse:collapse"><br></span></font></div></div></div></div></div></div>