How to add opencv-python in your GitLab submissions?

Package Name:

opencv-python

Usage:

import cv2

Solution

requirements.txt users :python:

Add in apt.txt:

libxrender1
libsm6
libglib2.0-0
libxext6

Add in requirements.txt:

opencv-python<4.3

[1]: Why <4.3? Could not build wheels for opencv-python


environment.yml users :conda:

Add in apt.txt:

libgl1-mesa-glx

Add in environment.yml:

name: yourenv
channels:
  - conda-forge
  - defaults
dependencies:
  - pip
  - py-opencv

[1]: Why libgl1-mesa-glx? Read


- How is runtime created and what all I can do?
Read about it here.

- Need help in adding some other dependency?
Post a new thread in the challenge you are participating.

- Still facing issue in adding opencv-python?
The dependencies for packages change over time.
In case you are unable to add dependency using the above, please comment on this post. :point_down:

2 Likes