Skip to content

matplotlib errors in env py3_std at HLRN

When I start an Ipython kernel at HLRN (say bdata1) in the py3_std environment, everything works as expected. However, when I activate that environment interactively at HLRN and then try to import e.g. pyplot from matplotlib, I get the following error:

ImportError                               Traceback (most recent call last)
<ipython-input-1-9fd843dc79b6> in <module>()
      8 from xorca.xorca.lib import load_xorca_dataset
      9 import xgcm
---> 10 from matplotlib import pyplot as plt
     11 from cmocean import cm
     12 from matplotlib import colors

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/pyplot.py in <module>()
    114 ## Global ##
    115 
--> 116 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
    117 
    118 _IP_REGISTERED = None

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/backends/__init__.py in pylab_setup(name)
     58     # imports. 0 means only perform absolute imports.
     59     backend_mod = __import__(backend_name, globals(), locals(),
---> 60                              [backend_name], 0)
     61 
     62     # Things we pull in from all backends

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py in <module>()
     14 
     15 from .backend_agg import FigureCanvasAgg
---> 16 from .backend_qt5 import (
     17     QtCore, QtGui, QtWidgets, _BackendQT5, FigureCanvasQT, FigureManagerQT,
     18     NavigationToolbar2QT, backend_version)

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py in <module>()
     16     _Backend, FigureCanvasBase, FigureManagerBase, NavigationToolbar2,
     17     TimerBase, cursors)
---> 18 import matplotlib.backends.qt_editor.figureoptions as figureoptions
     19 from matplotlib.backends.qt_editor.formsubplottool import UiSubplotTool
     20 from matplotlib.figure import Figure

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py in <module>()
     18 import matplotlib
     19 from matplotlib import cm, colors as mcolors, markers, image as mimage
---> 20 import matplotlib.backends.qt_editor.formlayout as formlayout
     21 from matplotlib.backends.qt_compat import QtGui
     22 

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py in <module>()
     54 
     55 from matplotlib import colors as mcolors
---> 56 from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
     57 
     58 

/gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py in <module>()
    135     if QT_API == QT_API_PYQT5:
    136         try:
--> 137             from PyQt5 import QtCore, QtGui, QtWidgets
    138             _getSaveFileName = QtWidgets.QFileDialog.getSaveFileName
    139         except ImportError:

ImportError: /lib64/libpthread.so.0: version `GLIBC_2.12' not found (required by /gfs1/work/shkifmwr/_TM/software/miniconda3_20180131/envs/py3_std/lib/python3.6/site-packages/PyQt5/../../.././libglib-2.0.so.0)

I am not sure whether this is a known behavior, as I think I never tried to use matplotlib within these environments interactively before. [Note that this also applies to the py2_std environment.] [[Also note, that I already tried to use different backends with matplotlib.use(<backend_name>), they all produce some kind of error....]]

Edited by Jan Klaus Rieck