docker - `sage -pip install --user ffmpeg` 没有使“`OSError: Error: ffmpeg doesn't seem to be installed.`”消息消失
问题描述
我在 Ubuntu 16 服务器上运行 Cocalc 的 Docker 实例。一切似乎都在工作,但我正在尝试调试为什么sage -pip install --user ffmpeg
没有让“ OSError: Error: ffmpeg does not appear to be installed.
”消息消失,即使它说它已经安装了。这是完整的信息。
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.
作为参考,这里是给出错误的代码:
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()
解决方案
尝试在系统范围内安装 ffmpeg 包?
sudo docker exec -it <name of cocalc container> bash
apt-get install ffmpeg # or something like that
推荐阅读
- angular - node_modules/angular-datatables/node_modules/rxjs/internal/types.d.ts(82,92):错误 TS1109:预期表达式
- google-apps-script - 为什么FormApp打不开表格?
- javascript - 将 HTML 表单上的 javascript 函数的值发送到 PHP 页面
- asp-classic - Request.Form - 获得空响应
- python - 选择 Pandas 数据框列的单个最小值而不是多个
- sass - Svelte - 无法预处理 SCSS 服务器端
- wix3.11 - Wix 设置编辑器根元素缺失
- browser - 麦克风和摄像头的浏览器权限 - Web 应用
- mysql - 如何计算每批次的手头数量(mysql)
- c - 在 Visual Studio 中编写静态库时如何控制导出的符号?