简体   繁体   中英

ImportError: cannot import name 'is_string_like' from 'matplotlib.cbook

    <ipython-input-8-8ef302d419f0> in <module>
      1 from netCDF4 import Dataset
      2 import numpy
----> 3 from SkewTplus.sounding import sounding

    ~\Anaconda3\lib\site-packages\SkewTplus\sounding.py in <module>
     19 
     20 from SkewTplus.`enter code here`errorHandling import fatalError
---> 21 from SkewTplus.skewT import figure
     22 
     23 

    ~\Anaconda3\lib\site-packages\SkewTplus\skewT.py in <module>
     23 from matplotlib.axes import Axes
     24 from matplotlib.backends import pylab_setup
---> 25 from matplotlib.cbook import is_string_like
     26 from matplotlib.figure import Figure
     27 from matplotlib.projections import register_projection

    ImportError: cannot import name 'is_string_like' from 'matplotlib.cbook' 
    (C:\Users\User\Anaconda3\lib\site-packages\matplotlib\cbook\__init__.py)

I got an error when I import SkewTplus . I don't know what to do. I have tried reinstalling matplotlib but the problem doesn't go away.

I met the same error and solved it by reinstalling it again.Make sure using conda and pip to reinstall the package and then reinstall it again.

 pip uninstall matplotlib conda uninstall matplotlib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM