Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoiding multiple PIP packages installation #677

Open
apatsekin opened this issue Jun 10, 2022 · 3 comments
Open

avoiding multiple PIP packages installation #677

apatsekin opened this issue Jun 10, 2022 · 3 comments

Comments

@apatsekin
Copy link

apatsekin commented Jun 10, 2022

Hey guys! A bit confused on how to properly set a PIP dependency for my package if it depends on OpenCV. README clearly states:

There are four different packages (see options 1, 2, 3 and 4 below) and you should SELECT ONLY ONE OF THEM.

implying
opencv-python
opencv-contrib-python
opencv-python-headless
opencv-contrib-python-headless

Say I have opencv-contrib-python-headless installed in my environment, and then I install pip package that depends on opencv-python-headless. Even though it can perfectly fine work with (and supposed to) opencv-contrib-python-headless, pip still gonna install opencv-python-headless breaking aforementioned rule.

How to handle that? What should that package set as a dependency to install opencv only if neither packages installed

@alalek
Copy link
Member

alalek commented Jun 11, 2022

There is Provides-Dist, but Python package managers doesn't support it yet.

Some discussion is here: opencv/opencv#21611


Current workaround - after install remove unused package variants.

@dcnieho
Copy link

dcnieho commented Dec 17, 2022

Shouldn't Obsoletes-Dist also be used, so that installing, e.g. opencv-contrib-python leads to opencv-python being removed if it was already there. Well, it would only in theory since neither of these fields is supported.

@dcnieho
Copy link

dcnieho commented Dec 17, 2022

I have added this to a relevant discussion, in the hope it may get picked up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants