Hi, On 30 August 2017 at 12:45, Oliver Lemke <oliver.le...@uni-hamburg.de> wrote: > In [1]: import typhon > cannot connect to X server > > ...and your ipython session will close. This is an issue with matplotlib, not > typhon. The correct workaround is to tell matplotlib to use a non-ui backend > such as Agg before importing typhon if no Xserver is available: > > In [1]: import matplotlib > In [2]: matplotlib.use('Agg') > In [3]: import typhon
Another way is to add a directive to your .matplotlibrc. For me this is located in: ~/.config/matplotlib/matplotlibrc where I have added: backend : Agg and when I do have access to X and want plots to show up, I run ipython with ipython --pylab=tk or some other backend. The advantage is that I don't need to put this directive in every script (that may run in the background or on some sort of cluster) and that I can still use those scripts for displaying my plots when working interactively. Gerrit. _______________________________________________ typhon.mi mailing list typhon.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/typhon.mi