gpt4 book ai didi

python - 由于 ffmpeg 不可用导致 matplotlib 动画 ArtistAnimation 失败

转载 作者:行者123 更新时间:2023-11-28 22:35:53 24 4
gpt4 key购买 nike

我正在尝试调用 matplotlib.animation.ArtistAnimation 以从一系列 png 图像制作动画,但我收到一个与 ffmpeg 相关的错误。我在我的 Ubuntu 14.04 上安装了 Anaconda。我收到的错误消息是:

UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py:782: UserWarning: MovieWriter ffmpeg unavailable
warnings.warn("MovieWriter %s unavailable" % writer)
...
File "/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py", line 810, in save
writer.grab_frame(**savefig_kwargs)
File "/home/ohm/anaconda2/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py", line 196, in saving
self.finish()
File "/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py", line 389, in finish
+ ' Try running with --verbose-debug')
RuntimeError: Error creating movie, return code: 1 Try running with --verbose-debug

我试过sudo apt-get install ffmpeg,但是没有这样的包。有人知道我缺少什么包裹吗?

最佳答案

conda update conda
conda install --channel https://conda.anaconda.org/conda-forge ffmpeg

关于python - 由于 ffmpeg 不可用导致 matplotlib 动画 ArtistAnimation 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37878769/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com