Troubleshooting - snoplusuk/echidna GitHub Wiki

Troubleshooting

matplotlib

If matplotlib runs but does not create a window in which the plot is displayed, you probably need to change the backend. By default matplotlib seems to use the Agg backend, which is non-interactive. You can check which backend you are using by running:

>>> import matplotlib
>>> print matplotlib.backends.backend

If this prints out Agg, then you probably need to change the backend.

Locate the matplotlibrc using matplotlib.matplotlib_fname(). Open this file and edit the backend : option (should be very close to the top of the configuration). The recommended backend to use is TkAgg.

On some linux based operating systems, e.g. SL6, you may need to install some additional dependencies first. For RPM based systems (Ubuntu equivalent in parenthesis):

tcl
tcl-devel (tcl-dev)
tk
tk-devel (tk-dev)
agg
agg-devel (agg-dev)

Once these are installed, you should uninstall matplotlib and then reinstall the dependencies with the pip --no-cache-flag.

pip --no-cache-dir install -r requirements.txt

This should automatically recognise the TkAgg backend, so if you then open the matplotlibrc the backend : option should be set to TkAgg. If not change it as before and hopefully everything should work.