我一直在尝试设置我的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的经验?请告诉我我错过了什么。谢谢。
发布于 2020-08-26 17:08:31
事实证明,Heroku使用requirements.txt比使用Pipfile工作得更好。更改安装文件后,部署过程进行得很顺利。
https://stackoverflow.com/questions/63576656
复制相似问题