Install pip install opencv-python-headless and in the requirements.txt use
pip install opencv-python-headless
requirements.txt
opencv-python-headless without version number.
opencv-python-headless