open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.84k stars 1.63k forks source link

[Bug] Unable to install MMCV 2.1.0 The detected CUDA version (11.8) mismatches the version that was used to compile PyTorch (12.1). Please make sure to use the same CUDA versions. #3104

Open Fernando961226 opened 4 months ago

Fernando961226 commented 4 months ago

Prerequisite

Environment

Reproduces the problem - code sample

N/A

Reproduces the problem - command or script

min install mmcv=2.1.0

Reproduces the problem - error message

Looking in links: https://download.openmmlab.com/mmcv/dist/cu121/torch2.3.0/index.html Collecting mmcv==2.1.0 Using cached mmcv-2.1.0.tar.gz (471 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: addict in /home/fernando/anaconda3/envs/sea-ice-fm/lib/python3.11/site-packages (from mmcv==2.1.0) (2.4.0) Collecting mmengine>=0.3.0 (from mmcv==2.1.0) Using cached mmengine-0.10.4-py3-none-any.whl.metadata (20 kB) File "/home/fernando/anaconda3/envs/sea-ice-fm/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 522, in build_extensions .....

    File "/home/fernando/anaconda3/envs/sea-ice-fm/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 522, in build_extensions
      _check_cuda_version(compiler_name, compiler_version)
    File "/home/fernando/anaconda3/envs/sea-ice-fm/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 417, in _check_cuda_version
      raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
  RuntimeError:
  The detected CUDA version (11.8) mismatches the version that was used to compile
  PyTorch (12.1). Please make sure to use the same CUDA versions.

Additional information

No response

zhouzaida commented 4 months ago

Hi, support for torch2.3.0 has only been available since mmcv2.2.0, you can install mmcv2.2.0 to avoid source compilation problems!

fengduduaaa commented 3 months ago

Hi, support for torch2.3.0 has only been available since mmcv2.2.0, you can install mmcv2.2.0 to avoid source compilation problems!

new bugs:"mmcv==2.2.0 is used but incompatible. Please install mmcv-full>=[2, 0, 0], <[2, 1, 0]."

smallrookie commented 3 months ago

Hi, support for torch2.3.0 has only been available since mmcv2.2.0, you can install mmcv2.2.0 to avoid source compilation problems!

new bugs:"mmcv==2.2.0 is used but incompatible. Please install mmcv-full>=[2, 0, 0], <[2, 1, 0]."

I had the same problem