ubuntu22.04安装pcdet0.6.0

安装anaconda、cuda11.1、gcc-9.5.0、pytorch1.9.1

conda create -n pcdet python=3.8 -y #创建python3.8虚拟环境
conda activate pcdet
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html   #安装对应版本pytorch

pip install spconv-cu111   #pip自动安装对应版本
git clone https://github.com/open-mmlab/OpenPCDet.git

cd OpenPCDet
pip install -r requirements.txt    # 注意安装pip install  kornia==0.6.5
python setup.py develop

选择安装pytorch版本最低1.9.1否则之后无法匹配所需安装的kormia包。

在执行pip install -r requirement.txt安装所需包时,如果出现错误,无法安装某个包,手动pip安装,或添加镜像源。 pip install  (例如 numba) -i https://pypi.tuna.tsinghua.edu.cn/simple

 在安装时先检查gcc版本是否正确。

gcc -v

版本不匹配在执行python setup.py develop 时可能会出现错误。

#error -- unsupported GNu version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however , using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

 版本过高出现问题,可以先卸载高版本重新安装gcc-9.5.0版本。

sudo apt-get remove  gcc

sudo apt autoremove

安装gcc-9.5.0

sudo apt-get install gcc-9

安装g++-9.5.0

sudo apt-get install g++-9

构建软连接

sudo ln -s /usr/bin/gcc-9 /usr/bin/gcc

sudo ln -s /usr/bin/g++-9 /usr/bin/g++

重新执行python setup.py develop 

可能出现问题cuda在上一过程中被卸载,重新安装cuda11.1即可。

若出现 subprocess.CalledProcessError:Command【‘which’,‘c++’】returned non-zero exit status 1错误。

创建符号连接, sudo ln -s /usr/bin/g++ /usr/bin/c++

再次重新执行python setup.py develop 

成功截图。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值