Python Matplotlib:';模块';对象没有属性';FFMpegWriter';/';作家';

Python Matplotlib:';模块';对象没有属性';FFMpegWriter';/';作家';,python,animation,matplotlib,ffmpeg,Python,Animation,Matplotlib,Ffmpeg,我正在尝试用Matplotlib制作一个图形的动画,这是我在以前的系统上做的。然而,我的代码在当前设置中似乎失败了 问题是: Writer = animation.writers['ffmpeg'] 回溯(最近一次呼叫最后一次): 文件“/Users/oliversanders/Documents/Code/PyCharm/plottools/animationTest.py”,第17行,在 Writer=动画。writers['ffmpeg'] AttributeError:“module”

我正在尝试用Matplotlib制作一个图形的动画,这是我在以前的系统上做的。然而,我的代码在当前设置中似乎失败了

问题是:

Writer = animation.writers['ffmpeg']
回溯(最近一次呼叫最后一次): 文件“/Users/oliversanders/Documents/Code/PyCharm/plottools/animationTest.py”,第17行,在 Writer=动画。writers['ffmpeg'] AttributeError:“module”对象没有属性“Writer”

或者:

mywriter = animation.FFMpegWriter(fps=15)
回溯(最近一次呼叫最后一次): 文件“/Users/oliversanders/Documents/Code/PyCharm/plottools/animatedPointPlotter.py”,第101行,在 mywriter=animation.FFMpegWriter(fps=15) AttributeError:“模块”对象没有属性“FFMpegWriter”

我刚刚重新安装了matplotlib(1.4.2)和ffmpeg(2.5.3),以获得更好的效果。我还删除了matplotlib目录中的所有.pyc文件,以确保它们不会弄乱任何东西

我环顾四周,但找不到解决办法。另见:


提前谢谢。

原来是个愚蠢而简单的问题。我使用的是pycharm(IDE),它从一个不正确的目录中导入了一个过时的matplotlib版本(顺便说一句,我还没有解决这个问题)。感谢tcaswell提示我检查模块从何处导入(
module.\uuuuu文件\uuuu
)。

matplotlib.\uuu版本\uuu提供了什么?您从何处导入了
动画
from?'version'在从终端运行时与在我的IDE中运行时提供了不同的结果,因此出现了问题。我还没想好检查一下,谢谢。