[英]How can I make sure ffmpeg is found with videohash?
I have been trying to deploy an app on Digital Ocean;我一直在尝试在 Digital Ocean 上部署一个应用程序; I have installed the necessary packages but I keep getting an error from the videohash library:
videohash.exceptions.FFmpegNotFound
I have tried adding the ffmpeg package directory to PATH
by running:我已经安装了必要的软件包,但我不断从 videohash 库中收到错误:
videohash.exceptions.FFmpegNotFound
我尝试通过运行将 ffmpeg package 目录添加到PATH
:
export PATH="$PATH:/workspace/web/.heroku/python/lib/python3.10/site-packages/ffmpeg"
I also tried adding it as an environment variable at app and component level and adding the export command to ./bashrc
but nothing I do seems to work.我还尝试在应用程序和组件级别将其添加为环境变量,并将导出命令添加到
./bashrc
但我所做的一切似乎都不起作用。 Is there another way I could try to solve this issue?还有其他方法可以尝试解决此问题吗?
Can you setting a variable in ipython console你可以在 ipython 控制台中设置一个变量吗
import os, os.environ['PATH']+=':/workspace/web/.heroku/python/lib/python3.10/site-packages/ffmpeg'
in Tools → Preference → iPython console → Startup → Lines.
I suppose a similar solution can be applied if Python console is being used instead of iPython console.如果使用 Python 控制台而不是 iPython 控制台,我想可以应用类似的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.