8000 backend default when no X server present · Issue #9140 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
backend default when no X server present #9140
Closed
@jrmlhermitte

Description

@jrmlhermitte

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0