mmdetection3d 安装报错 error:failed with exit status 1

mmdetection3d 安装报错 error: command ‘/usr/local/cuda-11.5/bin/nvcc’ failed with exit status 1

安装步骤:MMDetection3d Github README

具体报错:在安装mmdetection3d时报错,遍寻无果,最终在Github的issue中找到了解决方案,给后来的同学排排坑。


问题描述

使用命令 pip install -v -e 或是 python setup.py develop后出现如下错误

15 errors detected in the compilation of “mmdet3d/ops/spconv/src/reordering_cuda.cu”.
error: command ‘/usr/local/cuda-11.5/bin/nvcc’ failed with exit status 1

考虑过cuda版本不匹配的可能,再三检查后,nvidia-smi中cuda为11.5,实际安装cuda为11.3,而cudatoolkit可以向下兼容,故问题不大。

git clone https://github.com/open-mmlab/mmdetection3d.git
cd mmdetection3d
pip install -v -e .  # or "python setup.py develop"

解决方法:

添加语句:git checkout dev

You should encounter problems during compiling ops possibly because of incompatible gcc or cuda. We recommend you use gcc 5.4 to re-install mmdet3d. Or you can try our latest version by git checkout dev, which needs you to use mmcv > 1.4.7 and there is no need to compile ops in mmdet3d.
——Tai-Wang

前提是对应的mmcv版本高于1.4.7,此时无需在mmdet3d中编译ops,再继续安装即可。

你可能感兴趣的:(python)