代码:
from matplotlib import animation
输出:
ImportError: cannot import name 'animation' from partially initialized module 'matplotlib' (most likely due to a circular import)
motplotlib 版本是 3.3.4
代码:
from matplotlib import animation
输出:
ImportError: cannot import name 'animation' from partially initialized module 'matplotlib' (most likely due to a circular import)
motplotlib 版本是 3.3.4
simply update matplotlib using pip install --upgrade matplotlib
worked for me.
进行全新安装:
pip uninstall matplotlib
pip install matplotlib --force-reinstall --user
查到文件路径后终于解决了问题,我一直在用Anaconda的spyder,所以我用anaconda提示一遍又一遍卸载安装matplotlib,但是问题不是anaconda报错,而是python37空闲,似乎如果在空闲时安装了一个packege,spyder将首先运行那个(在我的情况下这是一个坏的),只需在python37空闲时删除matplotlib,问题终于解决了