MovieWriter imagemagick unavailable. Trying to use pillow instead.

问题背景

当使用matplotlib的下列代码时,提示警告:

from matplotlib import animation

anim = animation.FuncAnimation(plt.gcf(), animate, frames = len(frames), interval=50)
anim.save(path + filename, writer='imagemagick', fps=60)

提示警告如下:

MovieWriter imagemagick unavailable. Trying to use pillow instead.

解决办法

将 writer 的 “imagemagick” 改为 “pillow”,如下:

anim.save(path + filename, writer='pillow', fps=60)

你可能感兴趣的:(花,雨,风,修BUG,bug,warning,matplotlib)