为了账号安全,请及时绑定邮箱和手机立即绑定

Heroku 无法安装 av (pyav)

Heroku 无法安装 av (pyav)

阿波罗的战车 2023-06-20 17:25:38
我一直在尝试设置我的 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_nextsrc/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_DR1src/av/codec/codec.c:6117:36: note: each undeclared identifier is reported only once for each function it appears insrc/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_DR1error: command 'gcc' failed with exit status 1有没有人经历过这个?或者有在 Heroku 中使用 av/pyav 的经验吗?请告诉我任何我错过的事情。谢谢。
查看完整描述

1 回答

?
白衣染霜花

TA贡献1796条经验 获得超10个赞

事实证明,使用 Herokurequirements.txt比使用Pipfile. 更改安装文件后,部署过程顺利进行。



查看完整回答
反对 回复 2023-06-20
  • 1 回答
  • 0 关注
  • 244 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号