How to change matplotlib backends
Six years later and I came across a similar issue, when trying to decide which backend was available to use. Note see Caveats – below This code snippet works well for me: import matplotlib gui_env = [‘TKAgg’,’GTKAgg’,’Qt4Agg’,’WXAgg’] for gui in gui_env: try: print(“testing”, gui) matplotlib.use(gui,warn=False, force=True) from matplotlib import pyplot as plt break except: continue … Read more