【问题标题】:cannot import name 'animation' from 'matplotlib'无法从“matplotlib”导入名称“动画”
【发布时间】:2021-04-05 06:29:31
【问题描述】:

我尝试使用以下方式导入 matplotlib:

import matplotlib.pyplot as plt

但我收到此错误:

ImportError: cannot import name 'animation' from 'matplotlib' (C:\Users\David\AppData\Roaming\Python\Python37\site-packages\matplotlib_init_.py)。

我删除并重新安装了 matplotlib,我尝试安装较旧的 matplotlib 版本。

【问题讨论】:

    标签: matplotlib animation


    【解决方案1】:

    在我的情况下,更新 matplotlib 并重新启动内核(在 Jupyter 笔记本中)解决了这个问题。 我安装了这个版本:

    pip install --user matplotlib==3.5.0b1

    我意识到这个问题已经 10 个月了。 希望对其他用户有所帮助。

    【讨论】:

      猜你喜欢
      • 2021-01-20
      • 2019-03-29
      • 2021-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-20
      • 2015-12-22
      相关资源
      最近更新 更多