Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku and OpenCV with Python

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

Thanks!

like image 862
Jason Brooks Avatar asked Nov 09 '13 17:11

Jason Brooks


People also ask

Does heroku support OpenCV?

It is required since opencv has some additional dependencies that are not installed on heroku by default and needs to be installed manually. These dependencies can be installed by using linux commands sudo apt get install or sudo apt install.

How do I deploy OpenCV in Heroku?

Step 2: Activate your virtual environment and install the necessary modules. Step 3: Change the directory to mobilenetssd and create a file called app.py. In app.py, import the necessary modules. Step 4:Configure your static folder url, assign variables for the upload and download folders.

Which python version works best with OpenCV?

Install python 3.7 with anaconda package and use this command to install opencv.

Can I install OpenCV using pip?

Install OpenCV library with pip. After the installation of the Python and pip, we can directly install the OpenCV library and start using them. To install the library, we need to enter the given command in the terminal.


1 Answers

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

like image 155
Manu S Pillai Avatar answered Oct 12 '22 06:10

Manu S Pillai