简体   繁体   English

Heroku 无法安装 av (pyav)

[英]Heroku fails to install av (pyav)

I have been trying to set up my Python web app that uses opencv, tensorflow and av modules but keeps failing.我一直在尝试设置使用 opencv、tensorflow 和 av 模块的 Python Web 应用程序,但一直失败。 I have tried using the Aptfile to install several Ubuntu libraries ( libsm6, libxrender1 , etc.) and the install still fails.我曾尝试使用Aptfile安装多个 Ubuntu 库( libsm6, libxrender1等),但安装仍然失败。

After failing the install, the heroku server resolves to building the av module from source which fails as well, with gcc failing here:安装失败后,heroku 服务器解析为从源构建 av 模块也失败,gcc 在这里失败:

src/av/codec/codec.c:4003:19: warning: implicit declaration of function ‘av_codec_iterate’; did you mean ‘av_codec_next’? [-Wimplicit-function-declaration]
    __pyx_v_ptr = av_codec_iterate((&__pyx_v_opaque));
                ^~~~~~~~~~~~~~~~
                av_codec_next
src/av/codec/codec.c:4003:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    __pyx_v_ptr = av_codec_iterate((&__pyx_v_opaque));
                ^
src/av/codec/codec.c: In function ‘__pyx_pymod_exec_codec’:
src/av/codec/codec.c:6117:36: error: ‘AV_CODEC_CAP_HARDWARE’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DR1’?
__pyx_t_7 = __Pyx_PyInt_From_int(AV_CODEC_CAP_HARDWARE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)
                                    ^~~~~~~~~~~~~~~~~~~~~
                                    AV_CODEC_CAP_DR1
src/av/codec/codec.c:6117:36: note: each undeclared identifier is reported only once for each function it appears in
src/av/codec/codec.c:6138:36: error: ‘AV_CODEC_CAP_HYBRID’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DR1’?
__pyx_t_7 = __Pyx_PyInt_From_int(AV_CODEC_CAP_HYBRID); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)
                                    ^~~~~~~~~~~~~~~~~~~
                                    AV_CODEC_CAP_DR1
error: command 'gcc' failed with exit status 1

Has anyone experienced this?有没有人经历过这个? Or any experience with using av/pyav in Heroku?或者有在 Heroku 中使用 av/pyav 的经验吗? Please tell me anything that I missed.请告诉我任何我错过的东西。 Thanks.谢谢。

Turns out Heroku works better using requirements.txt than Pipfile .事实证明 Heroku 使用requirements.txt比使用Pipfile效果更好。 After changing the install file, the deployment process went fine.更改安装文件后,部署过程顺利。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM