ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

报错

ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

解决方案:

检查这3个库mmcv, mmdet and mmdet3d是否安装好

重新安装

pip uninstall mmcv
pip uninstall mmcv-full
pip uninstall mmdet
pip uninstall mmdet3d
apt update
apt install ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
apt clean
rm -rf /var/lib/apt/lists/*
git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
MMCV_WITH_OPS=1 pip install -e .
cd ..
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e .
git clone https://github.com/open-mmlab/mmdetection3d.git
cd mmdetection3d
pip install -v -e .
python setup.py develop

你可能感兴趣的:(python,开发语言)