You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose a new way to specify the opencv requirement (as either opencv-python-headless or opencv-python) using the setup.py's extra's mechanism.
Currently, if you aren't very careful about how you install mmengine / mmcv you will end up with pip in a state where it thinks there is some dependency conflict, e.g.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
mmengine 0.7.4 requires opencv-python>=3, which is not installed.
mmcv 2.0.0 requires opencv-python>=3, which is not installed.
The user needs to preinstall opencv and then there is a dynamic "choose requirement" part of the mmengine / mmcv setup.py that determines which one (opencv-python-headless or opencv-python) it will register as depending on. This is not ideal.
Instead it would be better if the user could declare which one they wanted to depend on and skip that check entirely. In this way the user could run:
pip install mmengine[cv2-headless]
OR
pip install mmengine[cv2-graphics]
and tell it which version of opencv it will depend on.
I have two preliminary PRs that layout the initial groundwork for this change: open-mmlab/mmcv#2775 and #1195
As-is the PRs won't entirely fix the problem, but they are the first step. The second step would be to remove the dynamic modification of install_requires so pip install mmengine does not depend on either opencv at all by default.
With these changes the old way of preinstall opencv and then mmengine would still work, but it would also allow the much cleaner explit one-step install commands.
Any other context?
No response
The text was updated successfully, but these errors were encountered:
What is the feature?
I'd like to propose a new way to specify the opencv requirement (as either opencv-python-headless or opencv-python) using the setup.py's extra's mechanism.
Currently, if you aren't very careful about how you install mmengine / mmcv you will end up with pip in a state where it thinks there is some dependency conflict, e.g.
The user needs to preinstall opencv and then there is a dynamic "choose requirement" part of the mmengine / mmcv setup.py that determines which one (opencv-python-headless or opencv-python) it will register as depending on. This is not ideal.
Instead it would be better if the user could declare which one they wanted to depend on and skip that check entirely. In this way the user could run:
and tell it which version of opencv it will depend on.
I have two preliminary PRs that layout the initial groundwork for this change: open-mmlab/mmcv#2775 and #1195
As-is the PRs won't entirely fix the problem, but they are the first step. The second step would be to remove the dynamic modification of
install_requires
sopip install mmengine
does not depend on either opencv at all by default.With these changes the old way of preinstall opencv and then mmengine would still work, but it would also allow the much cleaner explit one-step install commands.
Any other context?
No response
The text was updated successfully, but these errors were encountered: