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

MMCV==2.2.0 is used but incompatible. #279

Open
mohammadmirzaee25 opened this issue Apr 25, 2024 · 14 comments · May be fixed by #419
Open

MMCV==2.2.0 is used but incompatible. #279

mohammadmirzaee25 opened this issue Apr 25, 2024 · 14 comments · May be fixed by #419
Labels
Installation environment, dependencies, and mmcv...

Comments

@mohammadmirzaee25
Copy link

hi. i am encountering a problem .
in demo, where i run this line:
from mmyolo.registry import RUNNERS
i get this error:
16 assert (mmcv_version >= digit_version(mmcv_minimum_version)
---> 17 and mmcv_version < digit_version(mmcv_maximum_version)),
18 f'MMCV=={mmcv.version} is used but incompatible. '
19 f'Please install mmcv>={mmcv_minimum_version}, <{mmcv_maximum_version}.'

AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0.

@onuralpszr
Copy link
Contributor

@mohammadmirzaee25 in toml file we are using modified version of mmyolo for allow to install mmcv 2.2.0 so please check pyproject.toml file and readme instructions you can also look the google collab notebook for install

https://github.com/AILab-CVC/YOLO-World/blob/master/pyproject.toml
https://github.com/AILab-CVC/YOLO-World/blob/master/pyproject.toml#L44

@mohammadmirzaee25
Copy link
Author

mohammadmirzaee25 commented Apr 25, 2024

thanks for answering @onuralpszr .
but i have used this the demo google collab notebook before: https://colab.research.google.com/drive/1F_7S5lSaFM06irBCZqjhbN7MpUXo6WwO?usp=sharing
. and it was working fine till today but suddenly it is not working anymore.
and for installing those packages it is using these line:
import os
if 'COLAB_GPU' in os.environ:
!pip install requests==2.28.2 tqdm==4.65.0 rich==13.4.2
%pip install -U openmim
!mim install "mmengine>=0.7.0"
!mim install "mmcv"
else:
!pip install torch wheel requests==2.28.2 tqdm==4.65.0 rich==13.4.2
!pip install -e . -vv
but the error appears again . should i change or add anything?

@cyber-meow
Copy link

cyber-meow commented Apr 26, 2024

I am facing the same issue here. My code was working until I updated today.
(More precisely, I get the version constraint from mmdet which is imported in mmyolo
For now, manually performing mim install mmcv==2.1.0 after everything is installed seems to solve the problem.

@onuralpszr
Copy link
Contributor

@mohammadmirzaee25 @cyber-meow looks like mmcv made new release, I will adjust toml file and make more flexible so it can also run under pytorch 1 versions as well. Let me do PR work and will send it.

@mohammadmirzaee25
Copy link
Author

mohammadmirzaee25 commented Apr 26, 2024

thanks @onuralpszr @cyber-meow
for now mim install mmcv==2.1.0 takes a significant amount of time, but it does work.

@wondervictor wondervictor added the Installation environment, dependencies, and mmcv... label Apr 29, 2024
@kazakovaanastasia
Copy link

I also got this error after restarting my notebook today. after fixing this error with ( mim install mmcv==2.1.0 ) I get new one : " return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /opt/conda/lib/python3.10/site-packages/mmcv/_ext.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs ". Through google search I understood that it should be fixed by making the version of mmcv less, and here we go again. @mohammadmirzaee25 had not you got it and did you something with pytorch version ?

@mohammadmirzaee25
Copy link
Author

@kazakovaanastasia No. for me only mim install mmcv==2.1.0 is working.

@bf-yang
Copy link

bf-yang commented May 10, 2024

I meet the same problem: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.

@linfeng26
Copy link

I got this error after mim install mmcv==2.1.0 (CUDA version (10.2) mismatches the version that was used to compile PyTorch (12.1)), and then I found my torch changed! due to yolo-world 0.1.0 auto
so I reinstall torch -> 1.11.0 and install mmcv==2.1.0
ok creazy!
mmdet 3.0.0 requires mmcv<2.1.0,>=2.0.0rc4, but you have mmcv 2.1.0 which is incompatible.
mmyolo 0.6.0 requires mmcv<2.1.0,>=2.0.0rc4, but you have mmcv 2.1.0 which is incompatible.
yolo-world 0.1.0 requires torch>=2.1.0, but you have torch 1.11.0+cu102 which is incompatible
yolo-world 0.1.0 requires torchvision>=0.16.2, but you have torchvision 0.12.0+cu102 which is incompatible.
so, what's mean about installation?

@wondervictor
Copy link
Collaborator

Hi @linfeng26, you just need to follow the requirements.txt we provided in docs/installation.

@mohammadmirzaee25
Copy link
Author

hi @wondervictor , mim install mmcv==2.1.0 was working but now it is not working either .
i get AssertionError: MMCV==2.1.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.
then i used mim install mmcv==2.0.0
but installation failed.i tried !pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
but i get error:
ImportError: Failed to import custom modules from {'imports': ['yolo_world'], 'allow_failed_imports': False}, the current sys.path is:
/content
/env/python
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload

/usr/local/lib/python3.10/dist-packages
/usr/lib/python3/dist-packages
/usr/local/lib/python3.10/dist-packages/IPython/extensions
/root/.ipython
/tmp/tmp5kzf8dc2

You should set PYTHONPATH to make sys.path include the directory which contains your custom module
i am so confused. can you please update google colab notebook for demo too?
https://colab.research.google.com/drive/1F_7S5lSaFM06irBCZqjhbN7MpUXo6WwO?usp=sharing

@mohammadmirzaee25 mohammadmirzaee25 changed the title MMCV==2.2.0 is used but incompatible MMCV==2.2.0 is used but incompatible. Jun 17, 2024
@simran-khanuja
Copy link

still getting this error, did anyone resolve it and how?

@cyber-meow
Copy link

cyber-meow commented Jul 3, 2024

Following the suggestion of #364, I did mim install mmcv==2.1.0 and subsequently mim install mmdet==3.3.0 and that worked for me

@mohammadmirzaee25
Copy link
Author

still getting this error, did anyone resolve it and how?
for now iam using this:
!pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
!mim install mmcv==2.0.0
but when they update files, it wont work probably

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installation environment, dependencies, and mmcv...
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants