【问题标题】:Heroku fails to install av (pyav)Heroku 无法安装 av (pyav)
【发布时间】:2020-08-26 17:08:30
【问题描述】:

我一直在尝试设置我的 Python Web 应用程序,该应用程序使用 opencv、tensorflow 和 av 模块,但一直失败。我尝试使用Aptfile 安装几个Ubuntu 库(libsm6, libxrender1 等),但安装仍然失败。

安装失败后,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

有人经历过吗?或者有在 Heroku 中使用 av/pyav 的经验吗?请告诉我我错过的任何事情。谢谢。

【问题讨论】:

    标签: python heroku pyav


    【解决方案1】:

    事实证明 Heroku 使用 requirements.txt 比使用 Pipfile 效果更好。更改安装文件后,部署过程顺利。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-05
      • 1970-01-01
      • 2015-08-23
      • 2017-06-21
      • 1970-01-01
      • 1970-01-01
      • 2022-08-08
      • 2022-10-25
      相关资源
      最近更新 更多