dataloop-ai / dtlpy

Python SDK and CLI for Dataloop Platform
Apache License 2.0
16 stars 15 forks source link

Declared dependency on opencv-python is problematic #8

Closed purcell closed 4 years ago

purcell commented 4 years ago

opencv-python is a specific pre-compiled packaging of cv2, but other popular packages exist, e.g. opencv-contrib-python from the same authors, which contains cv2 plus extra features.

If a project which is using opencv-contrib-python for its extra features tries to also include dtlpy, the result will be two incompatible cv2 modules getting installed, and the project can fail to find the extra contrib features. At my current client, we have encountered this issue, and are unable to use dtlpy without maintaining a local fork.

In practice, it it also common for cv2 to be installed in the Python enviromment using system packaging, in which case pre-compiled python package of opencv from pypi are undesirable.

The suggested resolution would be to remove the explicit dependency on opencv-python, and instead note in documentation that cv2 must be installed by the user, either via system packages or by installing a precompiled version such as opencv-python or opencv-contrib-python.

Thanks!

purcell commented 4 years ago

This appears resolved in 1.16.10 - thanks!

AharonDL commented 4 years ago

@purcell we took your advice and removed open-cv requirement. Thank for your feedback!