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

Incompatible with MMCV 2.2.0 #3729

Open
KitakazePOI opened this issue Jul 8, 2024 · 7 comments
Open

Incompatible with MMCV 2.2.0 #3729

KitakazePOI opened this issue Jul 8, 2024 · 7 comments

Comments

@KitakazePOI
Copy link

Hi, I installed mmcv and mmseg from source and both said installed successfully.
When run the demo, it reported:

Traceback (most recent call last): File "demo/image_demo.py", line 6, in <module> from mmseg.apis import inference_model, init_model, show_result_pyplot File "/home/qrx/proj/mmsegmentation/mmseg/__init__.py", line 61, in <module> assert (mmcv_min_version <= mmcv_version < mmcv_max_version), \ AssertionError: MMCV==2.2.0 is used but incompatible. Please install mmcv>=2.0.0rc4.

Environment information:

sys.platform: linux
Python: 3.8.10 (default, Nov 22 2023, 10:22:35) [GCC 9.4.0]
CUDA available: True
MUSA available: False
numpy_random_seed: 2147483648
GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.4, V12.4.131
GCC: x86_64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
PyTorch: 2.3.0+cu121
PyTorch compiling details: PyTorch built with:

  • GCC 9.3
  • C++ Version: 201703
  • Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v3.3.6 (Git Hash 86e6af5974177e513fd3fee58425e1063e7f1361)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • LAPACK is enabled (usually provided by MKL)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • CUDA Runtime 12.1
  • NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
  • CuDNN 8.9.2
  • Magma 2.6.1
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.9.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.3.0, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=1, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,

OpenCV: 4.10.0
MMEngine: 0.10.4
MMCV: 2.2.0
MMCV Compiler: GCC 9.4
MMCV CUDA Compiler: 12.4

@singer0730
Copy link

I have the same issue,....Incompatible with MMCV 2.2.0

@yyxxiiaaoo
Copy link

if your cuda version is 11.1 and torch is 1.10.x
pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10/index.html
it works

@yifanlu0227
Copy link

Edit the __init__.py for mmseg (<PYTHON_DIR>/site-packages/mmseg/__init__.py) and remove the mmcv_max_version requirment.

assert (mmcv_min_version <= mmcv_version < mmcv_max_version), \
    f'MMCV=={mmcv.__version__} is used but incompatible. ' \
    f'Please install mmcv>=2.0.0rc4.'

to

assert (mmcv_min_version <= mmcv_version, \
    f'MMCV=={mmcv.__version__} is used but incompatible. ' \
    f'Please install mmcv>=2.0.0rc4.'

@bgpantojar
Copy link

I had this problem: open-mmlab/mmcv#1386

I managed to install mmcv two ways:

1 - pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.3/index.html
2 - buidling from the source as https://mmcv.readthedocs.io/en/latest/get_started/build.html

Unfortunatelly when runing the demo:
python demo/image_demo.py demo/demo.png configs/pspnet/pspnet_r50-d8_4xb2-40k_cityscapes-512x1024.py pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth --device cuda:0 --out-file result.jpg

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

Then again, if I try to install the version 2.0.0rc4, with pip or mim, it takes forever the wheel building.

Runing on Windows 11, my cuda is 12.4 and my pytorch 2.4.0. I am guessing that my problems are related to these versions of cuda and pytorch.

Is there a solution for this?

@wsqstar
Copy link

wsqstar commented Sep 1, 2024

I had this problem: open-mmlab/mmcv#1386

I managed to install mmcv two ways:

1 - pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.3/index.html 2 - buidling from the source as https://mmcv.readthedocs.io/en/latest/get_started/build.html

Unfortunatelly when runing the demo: python demo/image_demo.py demo/demo.png configs/pspnet/pspnet_r50-d8_4xb2-40k_cityscapes-512x1024.py pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth --device cuda:0 --out-file result.jpg

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

Then again, if I try to install the version 2.0.0rc4, with pip or mim, it takes forever the wheel building.

Runing on Windows 11, my cuda is 12.4 and my pytorch 2.4.0. I am guessing that my problems are related to these versions of cuda and pytorch.

Is there a solution for this?

I hope this works for you https://mmcv.readthedocs.io/en/latest/get_started/installation.html

@clolckliang
Copy link

我遇到了这个问题,我直接将mmsegmentation/mmseg/init.py中的MMCV_MAX的值修改为MMCV_MAX = '6.5.0'就好了
`

MMCV_MIN = '2.0.0rc4'
MMCV_MAX = '6.5.0'
MMENGINE_MIN = '0.5.0'
MMENGINE_MAX = '1.0.0'

`

@Teassassin
Copy link

我遇到了这个问题,我直接将mmsegmentation/mmseg/init.py中的MMCV_MAX的值修改为MMCV_MAX = '6.5.0'就好了 `

MMCV_MIN = '2.0.0rc4' MMCV_MAX = '6.5.0' MMENGINE_MIN = '0.5.0' MMENGINE_MAX = '1.0.0'

`

Works for me. My env is torch2.4.1+py3.10_cuda11.8_cudnn9_0.

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

No branches or pull requests

8 participants