open-mmlab / mmcv

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

When I install mmcv-full ==1.3.14, there's an importError: libcudart.so.10.2 #1380

Closed ggomac closed 3 years ago

ggomac commented 3 years ago

I have searched related issues but cannot get the expected help.

my environment GPU : GeForce RTX 3080 cuda version 11.1 pytorch 1.9.0

When I install mmcv-full =1.3.14 there's an import error : libcudart.so.10.2: cannot open shared object file

When I changed the mmcv-full version =1.3.13, the error was solved.

Why this error occurred?

zhouzaida commented 3 years ago

hi, what command did you use to install mmcv-full?

ggomac commented 3 years ago

hi, what command did you use to install mmcv-full?

I used this command

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html

zhouzaida commented 3 years ago

Could you provide the following environments?

echo $PATH
echo $LD_LIBRARY_PATH
zhouzaida commented 3 years ago

please check whether the CUDA/GCC runtimes are the same as those used for compiling mmcv.

ggomac commented 3 years ago

Could you provide the following environments?

echo $PATH
echo $LD_LIBRARY_PATH

export PATH=/usr/local/cuda-11.1/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH

ggomac commented 3 years ago

cuda 11.1

please check whether the CUDA/GCC runtimes are the same as those used for compiling mmcv.

cuda 11.1 gcc 9.3.0

459737087 commented 3 years ago

I also met this problem, File "/usr/local/lib/python3.8/site-packages/mmseg/apis/init.py", line 2, in from .inference import inference_segmentor, init_segmentor, show_result_pyplot File "/usr/local/lib/python3.8/site-packages/mmseg/apis/inference.py", line 9, in from mmseg.models import build_segmentor File "/usr/local/lib/python3.8/site-packages/mmseg/models/init.py", line 2, in from .backbones import * # noqa: F401,F403 File "/usr/local/lib/python3.8/site-packages/mmseg/models/backbones/init.py", line 5, in from .fast_scnn import FastSCNN File "/usr/local/lib/python3.8/site-packages/mmseg/models/backbones/fast_scnn.py", line 7, in from mmseg.models.decode_heads.psp_head import PPM File "/usr/local/lib/python3.8/site-packages/mmseg/models/decode_heads/init.py", line 5, in from .cc_head import CCHead File "/usr/local/lib/python3.8/site-packages/mmseg/models/decode_heads/cc_head.py", line 8, in from mmcv.ops import CrissCrossAttention File "/usr/local/lib/python3.8/site-packages/mmcv/ops/init.py", line 2, in from .bbox import bbox_overlaps File "/usr/local/lib/python3.8/site-packages/mmcv/ops/bbox.py", line 4, in ext_module = ext_loader.load_ext('_ext', ['bbox_overlaps']) File "/usr/local/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory

I think it doesn't have connection with cuda version or python version. @zhouzaida

python 3.8 cuda 10.2 mmcv-full 1.3.13

zhouzaida commented 3 years ago

hi, @459737087. It seems like that mmcv was complied in cuda10.1 but is called in cuda10.2. You can print the dependencies of mmcv/_ext.*so by ldd mmcv/_ext.*so

ggomac commented 3 years ago

Thanks for your contribution.