http://bugzilla.opensuse.org/show_bug.cgi?id=1136634 http://bugzilla.opensuse.org/show_bug.cgi?id=1136634#c4 Andreas Nordal <andreas_nordal_4@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andreas_nordal_4@hotmail.co | |m --- Comment #4 from Andreas Nordal <andreas_nordal_4@hotmail.com> --- Testcase: $ env -i DISPLAY=nimportequoi python3 -c 'import matplotlib; print(matplotlib.get_backend())' Qt5Agg $ env -i python3 -c 'import matplotlib; print(matplotlib.get_backend())' Unable to init server: Could not connect: Connection refused Unable to init server: Could not connect: Connection refused (-c:27058): Gdk-CRITICAL **: 22:19:42.241: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed (-c:27058): Gdk-CRITICAL **: 22:19:42.248: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed agg This is the working case, after uninstalling matplotlib, and installing it via pip3. In the non-working case, both return "agg". Explanation in Matplotlib's user guide: https://matplotlib.org/3.2.1/tutorials/introductory/usage.html If no backend is explicitly set, Matplotlib automatically detects a usable backend based on what is available on your system and on whether a GUI event loop is already running. On Linux, if the environment variable DISPLAY is unset, the "event loop" is identified as "headless", which causes a fallback to a noninteractive backend (agg). -- You are receiving this mail because: You are on the CC list for the bug.