python - 如何在 Windows 64 位上安装 ImageMagick 和 Anaconda?

标签 python animation matplotlib imagemagick anaconda

我下载了适用于 Windows 64 位的 ImageMagick 文件 ImageMagick-7.0.4-4-Q16-x64-dll.exe ( Link ) 并安装了它。

我正在使用 Anaconda,但出现以下错误:

C:\Anaconda2\lib\site-packages\matplotlib\animation.py:784: UserWarning: MovieWriter imagemagick unavailable
  warnings.warn("MovieWriter %s unavailable" % writer)

有谁知道 Anaconda 的 channel ,其中有适用于 win64 的 ImageMagick 软件包吗?

PS:例如,这里有一个名为 kalefranz 的 channel ,带有 ImageMagick 软件包,但仅适用于 Linux 64 位 ( https://anaconda.org/kalefranz/imagemagick )

最佳答案

正如@furas所说,保存动画的最佳方法是使用ffmpeg将其保存为MP4文件,然后打开cmd.exe并输入:ffmpeg -i C:\my_path\animation.mp4 C:\my_path\animation.gif

从Python我们可以做到:

import os
os.system("ffmpeg -i C:\\my_path\\animation.mp4 C:\\my_path\\animation.gif")
# \\ allows to bypass any ascii issue because for example in python "\a" means "\x07" and "\\a" means "\a"

关于python - 如何在 Windows 64 位上安装 ImageMagick 和 Anaconda?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41699931/

相关文章:

android - 3D旋转-透视

swift - 启动屏幕消失后和 viewDidAppear() 方法运行之前出现奇怪的动画 'lag'

python - 从 slider 在 Matplotlib (Python) 中绘制复杂函数?

python - 如何使 cStringIO 对另一个需要真实本地文件的函数透明

python - 在python中将字母数字字符串转换为int,反之亦然

python - 自动执行重复的键盘操作

python - 外星人入侵 - Pygame - 外星人走出屏幕

python - 如何从 pandas 数据集中创建网格大小不均匀的热图?

Android - 具有弹跳效果的动画弹出对话框

python - 如何更改 Pandas 箱线图中 mustache 的线条样式?