首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >` `sage -pip安装--用户ffmpeg`没有使“` go错误:错误: ffmpeg似乎未安装”消息消失。

` `sage -pip安装--用户ffmpeg`没有使“` go错误:错误: ffmpeg似乎未安装”消息消失。
EN

Stack Overflow用户
提问于 2019-08-19 03:19:56
回答 1查看 61关注 0票数 2

我正在Ubuntu 16服务器上运行Cocalc的Docker实例。一切似乎都在正常工作,但我正在尝试调试为什么sage -pip install --user ffmpeg没有让"OSError: Error: ffmpeg does not appear to be installed.“消息消失,尽管它说它已经安装了。下面是完整的信息。

代码语言:javascript
复制
Error in lines 9-9
Traceback (most recent call last):
  File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1188, in execute
    flags=compile_flags) in namespace, locals
  File "", line 1, in <module>
  File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2944, in show
    s = show0(objs, combine_all=True)
  File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2903, in show0
    b = show0(a)
  File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2868, in show0
    show_animation(obj, **kwds)
  File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2642, in show_animation
    obj.ffmpeg(t, delay=delay, **kwds)
  File "/usr/local/sage/local/lib/python2.7/site-packages/sage/plot/animate.py", line 885, in ffmpeg
    raise OSError(msg)
OSError: Error: ffmpeg does not appear to be installed. Saving an animation to
a movie file in any format other than GIF requires this software, so
please install it and try again.

作为参考,下面是给出错误的代码:

代码语言:javascript
复制
n = var("n")
frames = []
xr = (x, 0, 1)
for k in srange(1, 50):
    g = plot((sum((-1)^(n-1)*sin(n*x)/n,n,1,k)), xr, color="blue", legend_label='k = %d' % k)
    g += plot(x/2, xr, color="green", legend_label="x/2")
    frames.append(g)

a = animate(frames, ymin=0.0, ymax=1.0, legend_loc=(0.2,0.8))
a.show()
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-09-02 08:12:23

尝试在系统范围内安装ffmpeg包?

代码语言:javascript
复制
sudo docker exec -it <name of cocalc container> bash
apt-get install ffmpeg # or something like that
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57547656

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档