问题
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