在 Google Colaboratory 中安装 imagemagick

Install imagemagick in Google Colaboratory

我正在尝试通过 imagemagick 包将动画保存为 gif。 这就是我所做的

anim.save('animation.gif', writer='imagemagick', fps=10)

但我收到以下警告

MovieWriter imagemagick unavailable; trying to use <class 'matplotlib.animation.PillowWriter'> instead.

由于 imagemagick 不是 python 软件包,我该如何在 Google colab 中安装它? 或者,是否有其他包可用于在 google colab 中将动画保存为 gif?

您可以使用 apt

安装它
!apt install imagemagick