PythonDataScienceHandbook icon indicating copy to clipboard operation
PythonDataScienceHandbook copied to clipboard

Notebook that uses matplotlib in Binder don't run

Open ncclementi opened this issue 6 years ago • 3 comments

When trying to run notebook using binder, every time a cell has import matplotlib.pyplot as plt I get an error: I was checking in the notebooks that the matplotlib version in this binder is '1.5.1', not sure if that is the problem, but as right now I can't run any notebook that has import matplotlib.pyplot as plt

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-9a9995b9d477> in <module>
      1 #%matplotlib inline
----> 2 import matplotlib.pyplot as plt
      3 #plt.style.use('seaborn-whitegrid')
      4 #import numpy as np

/srv/conda/lib/python3.5/site-packages/matplotlib/pyplot.py in <module>
     27 from cycler import cycler
     28 import matplotlib
---> 29 import matplotlib.colorbar
     30 from matplotlib import style
     31 from matplotlib import _pylab_helpers, interactive

/srv/conda/lib/python3.5/site-packages/matplotlib/colorbar.py in <module>
     30 
     31 import matplotlib as mpl
---> 32 import matplotlib.artist as martist
     33 import matplotlib.cbook as cbook
     34 import matplotlib.collections as collections

/srv/conda/lib/python3.5/site-packages/matplotlib/artist.py in <module>
     12 from matplotlib.cbook import mplDeprecation
     13 from matplotlib import docstring, rcParams
---> 14 from .transforms import (Bbox, IdentityTransform, TransformedBbox,
     15                          TransformedPath, Transform)
     16 from .path import Path

/srv/conda/lib/python3.5/site-packages/matplotlib/transforms.py in <module>
     37 import numpy as np
     38 from numpy import ma
---> 39 from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
     40     update_path_extents)
     41 from numpy.linalg import inv

ImportError: numpy.core.multiarray failed to import

ncclementi avatar Mar 13 '19 16:03 ncclementi

me too !

alixHG avatar Apr 25 '21 13:04 alixHG

This issue just started occurring on my notebooks as well. Is there a work around?

edterrell avatar Apr 26 '21 12:04 edterrell

Sorry, for not be more explicit: the error I am receiving is:

ImportError: cannot import name '_imaging'

edterrell avatar Apr 26 '21 12:04 edterrell