I'm trying to install OpenCV on Heroku so my Python web app can use OpenCV. How can I go about doing this?
Thanks!
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.
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.
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 :
来源:https://stackoverflow.com/questions/19879663/heroku-and-opencv-with-python