-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Bug] AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0. #3096
Comments
I installed the latest version of release today I had the same problem |
Same issue. Any solution? |
@DrRazadyne @solayuta For me I changed |
pip install mmcv==2.0.0rc4 try this, in my case it got fixed |
For me this doesn't help, I get the following error by running "pip install mmcv==2.0.0rc4":
Online I found a fix to install mmcv from the source but then I get the first problem again that I have version 2.2.0. Does anyone know how to fix this? |
I changed "mmdet/init.py" line9 "2.2.0" to "2.2.1" to forcely make it compatible. |
maybe your mmdet version are too high. If you git mmdet from website, it is the latest 3.3.0. I recommend you to install mmdet==3.0.0 (https://github.com/open-mmlab/mmdetection/releases/tag/v3.0.0), then try this again |
just use 2.1.0 instead |
Try this |
@Zhijing-W where are you getting that compatibility matrix from? The one I can see isnt right I think: https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/notes/faq.md. Is this issue due to a recent update? What is the last stable version I can use now? Or is the library completely broken until next patch? |
in my case, i comment out part of the code in mmseg/init.py from line 60 to line 62, it got fixed |
From here: https://mmyolo.readthedocs.io/en/latest/get_started/dependencies.html. I use the version mmcv==2.0.0rc4, mmengine==0.7.1,for installing mmyolo==0.6.0. Incompatibility may caused by too high version. You can strictly follow the requirements of the compatibility matrix. |
Such modification is OK and works well. |
Why is this error occurring? The reason is that we have released a new version but the downstream libraries are not yet supported. There are two solutions, one is to install a lower version of mmcv (but the lower version of mmcv may not provide support for torch2.2.0), and the other is to change the mmcv version restriction in the init file of the downstream libraries, which works fine this way. |
You will need to modify all c++14 to c++17 in setup.py
|
If you are working in google colab, just run this
After the first pip install for openmim, it might ask you to reset your session for colab, do that, and then re-run the same cell again, it should take around 45-60m to run the entire thing, but it should run successfully, give it a try |
As @wstlxx mentioned above, if using 2.1.0 is an option for you then you can just install the version that is compatible with your pytorch and cuda version. Example for cuda 12.1 and torch 2.1: |
I am getting this error: ImportError: /usr/local/lib/python3.8/dist-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104cuda9SetDeviceEi |
@alexsuakim I think if you use the CUDA 12.0+ versions it should work fine |
i love you! you are very very handsome! |
pip install mmcv-lite==2.0.0rc4 usefull for my case |
thanks!this works for me!!! |
THANK YOU IT WORKS FOR ME ALSO |
not sure but the issue is still persisting for me,I tried |
Prerequisite
Environment
%pip install -U openmim
!mim install mmengine
!sed -i 's/^LayerId = cv2.dnn.DictValue/#&/' /usr/local/lib/python3.10/dist-packages/cv2/typing/init.py
!mim install "mmcv>=2.1.0"
%cd mmdetection
%pip install -v -e .
%pip install protobuf==3.20
!python /home/MMDetection/mmdetection/tools/train.py
/home/MMDetection/mmdetection/configs/retinanet/retinanet_r50_fpn_1x_Headvhelmet.py
--work-dir /home/MMDetection/blablabladelete/test```
Reproduces the problem - command or script
Installing mmcv like this
Installs the latest version 2.2.0 since it was released yesterday
Traceback (most recent call last):
File "/home/MMDetection/mmdetection/tools/train.py", line 10, in
from mmdet.utils import setup_cache_size_limit_of_dynamo
File "/home/MMDetection/mmdetection/mmdet/init.py", line 17, in
and mmcv_version < digit_version(mmcv_maximum_version)),
AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0.
The text was updated successfully, but these errors were encountered: