docker - `sage -pip install --user ffmpeg` 没有使 "` OSError : Error: ffmpeg does not appear to be installed. `"消息消失

标签 docker ffmpeg pip sage

我正在 Ubuntu 16 服务器上运行 Cocalc 的 Docker 实例。一切似乎都正常,但我正在尝试调试为什么 sage -pip install --user ffmpeg 没有出现“OSError:错误:ffmpeg 似乎未安装。” >”消息消失,尽管它说它已安装。这是完整的消息。

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

关于docker - `sage -pip install --user ffmpeg` 没有使 "` OSError : Error: ffmpeg does not appear to be installed. `"消息消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57547656/

相关文章:

python - 无法在 Jupyter notebook 中导入 opencv 但能够在 Anaconda 的命令行中导入

amazon-ec2 - 如何在不使用弹性 beantalk 或 ec2 容器服务的情况下在 aws 上部署 docker 容器

php - NGINX + PHP-FPM-是否应该将它们放在单独的容器中?

c++ - 如何在保持低延迟的同时流式传输实时音频和视频

c - 将提取的帧名称存储在数组中 - ffmpeg

python - pip 为 python 3.4 安装 igraph : compiler error

Docker Buildx 无法从本地拉取继承的镜像

docker - 如何通过Golang的SDK获取docker api版本?

php - FFMPEG 在本地主机和终端中工作,但不在实时网站上工作

virtualenv 中的 Python easy_install 给出了 setuptools 错误