That’s because there is not PyPI module with the name “cv2”, I would say. So for example, pip install cv2
will also fail in your local Python environment. How did you install the package in your local environment?
I guess what you want is opencv-python · PyPI, at least in their readme they use it with import cv2
. So you should add opencv-python
to your requirements.txt
.