Import cv2

My requirements.txt have:
streamlit==0.56.0
opencv-contrib-python==4.1.2.30
opencv-python==4.1.2.30

Locally it runs ok, but shows a error message when deploy:
at=error code=H10 desc=“App crashed” method=GET path="/healthz" host=opencv-face.herokuapp.com request_id=39c6e51d-a024-43ee-b6f0-fdfc57f83a8e fwd=“191.19.195.204” dyno= connect= service= status=503 bytes= protocol=http

When I put import cv2 shows this message above.

Anyone can help me ?

Hi,

I do not have a heroku development with opencv, however,
I thought that if using opencv-contrib-python, you do NOT need to also have opencv-python

Moreover, I think you need to use the headless package so that it can work on heroku… opencv-contrib-python-headless

Thanks for your reply.