Closed
Description
Bug report
Bug summary
matplotlib.pyplot
isn't friendly to remotely run commands with no X server:
In [1]: import matplotlib.pyplot
In [2]: QXcbConnection: Could not connect to display
Aborted
However, selecting the backend before hand fixes the problem:
In [1]: import matplotlib
In [2]: matplotlib.use("Agg")
In [3]: import matplotlib.pyplot
I am not very familiar, but could there be some check of the display module before importing? My problem is I obtain this error when running on a remote server with no X11 forwarding and importing a library that by default imports maplotlib.pyplot
. (The library is pims
)
Matplotlib version
- Operating System: Linux (Debian)
- Matplotlib Version: 1.5.3
- Python Version: 3.5.3
- IPython Version : 5.1.0
I installed matplotlib via pip.