-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix dependencies #146
fix dependencies #146
Conversation
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
======================================
Coverage 39.5% 39.5%
======================================
Files 67 67
Lines 2724 2724
======================================
Hits 1076 1076
Misses 1648 1648 Continue to review full report at Codecov.
|
265556d
to
e60be4e
Compare
setup.py
Outdated
|
||
dist.Distribution().fetch_build_eggs(['Cython', 'numpy>=1.11.1']) | ||
|
||
import numpy # noqa: E402 | ||
from Cython.Distutils import build_ext # noqa: E402 | ||
|
||
|
||
def choose_requirement(main, secondary): | ||
"""If some version version of main requirement installed, return main, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor typo here: version version
.
setup.py
Outdated
] | ||
# If first not installed install second package | ||
CHOOSE_INSTALL_REQUIRES = [('opencv-python>=4.1.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may relax the version requirement for opencv. OpenCV 3 & 4 should both work well.
Thanks for the fix! |
Hi @DXist, I changed the priority of |
Hi @hellock . It's ok for me but there would be inconsistency with albumentations order that is used by mmdetection. If mmdetection and mmcv are installed by a single |
I see, so the installation guide in mmdetection should be the following to avoid installing both
If users would like to switch to |
@hellock sounds reasonable |
Hi, if I install opencv-python-headless first, and then run pip install mmcv Then it also installs opencv-python and i end up with both versions installed. This gives me errors when I try to run python test.py for example. Any suggestion on how to install mmcv so that it detects that I have the headless library already installed and avoids installing the non-headless? |
There is inconsistency: albumentations checks for regular opencv-python version and installs headless variant by default, mmcv does the opposite: checks for headless version and installs regular one by default. Visualization can be viewed as an extra feature. If someone needs it then he/she could install regular opencv-python and related dependencies. |
Hi @DXist !First of all, we want to express our gratitude for your significant PR in the mmcv project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR. We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG If you have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:) |
1 similar comment
Hi @DXist !First of all, we want to express our gratitude for your significant PR in the mmcv project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR. We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG If you have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:) |
This PR changes install_requires.
Dependency on opencv-python is resolved in the same way as done in albumentationshttps://github.com/albu/albumentations/blob/master/setup.py#L12) library.
opencv-python
is used if it has already been installed. Otherwiseopencv-python-headless
is used which is good for minimal container environments.Cython is build-time dependency and is removed from install_requires