CERN Accelerating science

Error when importing matplotlib.pyplot on 'Bleeding Edge Python3' Software Stack

Hi SWAN Team!

If this is in the wrong section, please redirect as you see fit.

I’ve been using the ‘Bleeding Edge Python3’ Software Stack in order to have access to pandas 0.24, but since Monday evening I cannot run on ‘Bleeding Edge Python3’ without running into an issue when importing matplotlib.pyplot.

Here’s the error message:

AttributeError                            Traceback (most recent call last)
<ipython-input-2-6f4421f52ee3> in <module>
      2 #%matplotlib notebook
----> 4 import matplotlib.pyplot
      6 # Do all the imports

/cvmfs/ in <module>
   2347     dict.__setitem__(rcParams, "backend", rcsetup._auto_backend_sentinel)
   2348 # Set up the backend.
-> 2349 switch_backend(rcParams["backend"])
   2351 # Just to be safe.  Interactive mode can be turned on without

/cvmfs/ in __getitem__(self, key)
    818             if val is rcsetup._auto_backend_sentinel:
    819                 from matplotlib import pyplot as plt
--> 820                 plt.switch_backend(rcsetup._auto_backend_sentinel)
    822         return dict.__getitem__(self, key)

/cvmfs/ in switch_backend(newbackend)
    202                           "wxagg", "agg"]:
    203             try:
--> 204                 switch_backend(candidate)
    205             except ImportError:
    206                 continue

/cvmfs/ in switch_backend(newbackend)
    213         else "matplotlib.backends.backend_{}".format(newbackend.lower()))
--> 215     backend_mod = importlib.import_module(backend_name)
    216     Backend = type(
    217         "Backend", (matplotlib.backends._Backend,), vars(backend_mod))

/cvmfs/ in import_module(name, package)
    124                 break
    125             level += 1
--> 126     return _bootstrap._gcd_import(name[level:], package, level)

/cvmfs/ in <module>
      3 from .. import cbook
----> 4 from . import backend_agg, backend_cairo, backend_gtk3
      5 from .backend_cairo import cairo
      6 from .backend_gtk3 import Gtk, _BackendGTK3

/cvmfs/ in <module>
     13 try:
     14     import cairo
---> 15     if cairo.version_info < (1, 11, 0):
     16         # Introduced create_for_data for Py3.
     17         raise ImportError

AttributeError: module 'cairo' has no attribute 'version_info'

If this is not fixable for the time being, I respect that considering the Software Stack is labelled as ‘unstable’, but I nevertheless ask if this can be fixed because I have code necessitating pandas 0.24.

Thank you for the time and service,

@etejedor do you know whom to ask about the broken matplotlib.pyplot stuff in CVMFS?

Hi Joel,

Thank you for reporting this!

The software librarians that take care of the LCG releases recently updated many packages on bleeding edge:

Please open a JIRA ticket to the librarians:

They explicitly requested the feedback from the users in case some issue was detected.

Excellent, thanks a ton! I will do just that then.

All the best,