3

Since upgrading to 14.04 any python code I run that uses matplotlib returns an error. Here is what my ipython console returns

In [1]: import matplotlib.pyplot as plt
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 9 but this version of numpy is 6
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-eff513f636fd> in <module>()
----> 1 import matplotlib.pyplot as plt

/usr/lib/pymodules/python2.7/matplotlib/pyplot.py in <module>()
     22 
     23 import matplotlib
---> 24 import matplotlib.colorbar
     25 from matplotlib import _pylab_helpers, interactive
     26 from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike

/usr/lib/pymodules/python2.7/matplotlib/colorbar.py in <module>()
     25 
     26 import matplotlib as mpl
---> 27 import matplotlib.artist as martist
     28 import matplotlib.cbook as cbook
     29 import matplotlib.collections as collections

/usr/lib/pymodules/python2.7/matplotlib/artist.py in <module>()
      6 import matplotlib.cbook as cbook
      7 from matplotlib import docstring, rcParams
----> 8 from transforms import Bbox, IdentityTransform, TransformedBbox, \
      9                        TransformedPath, Transform
     10 from path import Path

/usr/lib/pymodules/python2.7/matplotlib/transforms.py in <module>()
     33 import numpy as np
     34 from numpy import ma
---> 35 from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
     36     update_path_extents)
     37 from numpy.linalg import inv

ImportError: numpy.core.multiarray failed to import

1 Answer 1

0

I needed to upgrade numpy

pip install -U numpy

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .