import matplotlib ImportError: cannot import name 'is_string_like'

Traceback (most recent call last):
  File "321.py", line 2, in <module>
    import matplotlib.pyplot as pt
  File "C:\ProgramData\Anaconda3\envs\tensorflow\
init__.py", line 122, in <module>
    from matplotlib.cbook import is_string_like,
el
ImportError: cannot import name 'is_string_like'

在anaconda环境下,安装命令尽量使用 conda install matplotlib,如果同时使用pip install matplotlib,然后在使用conda install matplotlib ,便会报出以上错位。

如果报出以上错误,建议使用pip uninstall matplotlib,conda uninstall matplotlib,卸载干净之后,重新conda uninstall matplotlib,这样就会成功
--------------------- 
作者:zhicheng_angle 
来源:CSDN 
原文:https://blog.csdn.net/zhicheng_angle/article/details/84062129 
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/QiuShuiFuPing/article/details/84667122