Heroku and OpenCV with Python

流过昼夜 提交于 2019-11-28 00:15:21

问题


I'm trying to install OpenCV on Heroku so my Python web app can use OpenCV. How can I go about doing this?

Thanks!


回答1:


Links posted by friism didin't work for me, so I created a custom buildpack that should be more than enough for the situation you described.

You can find the buildpack here.




回答2:


this question has also come up on the Heroku forums. It looks like there are a couple buildpacks you could look into:

  • https://github.com/gimlids/heroku-buildpack-python-opencv
  • https://github.com/hdachev/heroku-buildpack-opencv

Here's how to use a custom buildpack.




回答3:


Its for the fellow googlers who might have been facing the same issue. Just simply change opencv-python in your requirements.txt to opencv-python-headless.

opencv-python-headless is an opencv build that has no gpu support. The file libsm.so (P.S dont remember the name correctly) that is giving the error is for GPU support.

For reference :

opencv-python-headless



来源:https://stackoverflow.com/questions/19879663/heroku-and-opencv-with-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!