安装OpenPCDet碰到的问题

2024-03-15 22:38
文章标签 问题 安装 碰到 openpcdet

本文主要是介绍安装OpenPCDet碰到的问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Ubuntu18.04重新安装了,现在要把OpenPCDet也重新装上,按照官方的教程来,一路安装好了torch, numpy之类的东西,没碰到问题,之后 开始安装OpenPCDet,然后就碰到了下面的问题,

问题1  IndexError: list index out of range


(openmmlab) user@MS-7816:~/devAI/OpenPCDet$ python setup.py develop
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
running develop
running egg_info
writing pcdet.egg-info/PKG-INFO
writing dependency_links to pcdet.egg-info/dependency_links.txt
writing requirements to pcdet.egg-info/requires.txt
writing top-level names to pcdet.egg-info/top_level.txt
reading manifest file 'pcdet.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'pcdet.egg-info/SOURCES.txt'
running build_ext
building 'pcdet.ops.iou3d_nms.iou3d_nms_cuda' extension
Traceback (most recent call last):File "setup.py", line 114, in <module>'src/sampling_gpu.cu',File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setupreturn distutils.core.setup(**attrs)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/core.py", line 148, in setupdist.run_commands()File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/dist.py", line 966, in run_commandsself.run_command(cmd)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/dist.py", line 985, in run_commandcmd_obj.run()File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in runself.install_for_development()File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/setuptools/command/develop.py", line 114, in install_for_developmentself.run_command('build_ext')File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/cmd.py", line 313, in run_commandself.distribution.run_command(command)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/dist.py", line 985, in run_commandcmd_obj.run()File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run_build_ext.run(self)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run_build_ext.build_ext.run(self)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/command/build_ext.py", line 340, in runself.build_extensions()File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensionsbuild_ext.build_extensions(self)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions_build_ext.build_ext.build_extensions(self)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensionsself._build_extensions_serial()File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serialself.build_extension(ext)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension_build_ext.build_extension(self, ext)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extensiondepends=ext.depends)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 525, in unix_wrap_ninja_compilecuda_post_cflags = unix_cuda_flags(cuda_post_cflags)File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 424, in unix_cuda_flagscflags + _get_cuda_arch_flags(cflags))File "/home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1562, in _get_cuda_arch_flagsarch_list[-1] += '+PTX'
IndexError: list index out of range

然后到网上查看了一圈,说是nvidia没安装好,解决办法如下,

可见,最初的错误是:

    CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero.


https://github.com/pytorch/pytorch/issues/49081#issuecomment-766793705
上找到解决方法:

    yurunsheng1 commented on 25 Jan

    apt-get install nvidia-modprobe

    This works for me.

这个也work for me.

    The nvidia-modprobe utility is used by user-space NVIDIA driver components to make sure the NVIDIA kernel module is loaded and that the NVIDIA character device files are present. These facilities are normally provided by Linux distribution configuration systems such as udev.

然后我试了一下,不行,依然报错,不过,我另外检查了一下我的nividia驱动,

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

nvidia驱动找不到,这个问题有点怪,因为我确定安装过了。于是找到自己以前的贴子,

《Ubuntu18.04查看显卡信息并安装NVDIA显卡驱动driver + Cuda + Cudnn》

https://blog.csdn.net/tanmx219/article/details/107591416

$ ubuntu-drivers devices
WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B06sv00001458sd00003752bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-495 - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-460 - distro non-free
driver   : nvidia-driver-460-server - distro non-free
driver   : nvidia-driver-470 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

发现推荐的是

nvidia-driver-470 - distro non-free recommended

根据上面的链接,找到官方地址:

NVIDIA DRIVERS Linux x64 (AMD64/EM64T) Display Driver

下载下来后安装好,

$ sudo sh NVIDIA-Linux-x86_64-470.86.run

安装过程可以参考我上面给出的链接《Ubuntu18.04查看显卡信息并安装NVDIA显卡驱动driver + Cuda + Cudnn》。

检查一下,OK了,

$ nvidia-smi
Thu Dec  2 10:40:45 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| 32%   27C    P5    43W / 300W |      0MiB / 11178MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

开始安装,

(openmmlab) matthew@matthew-MS-7816:~/devAI$  cd OpenPCDet
(openmmlab) matthew@matthew-MS-7816:~/devAI/OpenPCDet$ python setup.py develop

一路顺利,不过很快第二个错误出现了,

各个包的版本问题,如llvmlite ,numpy, pillow, etc.

error: llvmlite 0.38.0rc1 is installed but llvmlite<0.38,>=0.37.0rc1 is required by {'numba'}

没有什么特别的办法,一路 上改版本,一个个地装,全部安装过程在下面,

(openmmlab) matthew@matthew-MS-7816:~/devAI/OpenPCDet$ pip install llvmlite==0.37
Collecting llvmlite==0.37Downloading llvmlite-0.37.0-cp37-cp37m-manylinux2014_x86_64.whl (26.3 MB)|████████████████████████████████| 26.3 MB 115 kB/s 
Installing collected packages: llvmliteAttempting uninstall: llvmliteFound existing installation: llvmlite 0.38.0rc1Uninstalling llvmlite-0.38.0rc1:Successfully uninstalled llvmlite-0.38.0rc1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pcdet 0.5.0+3fa8b51 requires numpy<=1.20, but you have numpy 1.21.2 which is incompatible.
numba 0.54.1 requires numpy<1.21,>=1.17, but you have numpy 1.21.2 which is incompatible.
Successfully installed llvmlite-0.37.0(openmmlab) matthew@matthew-MS-7816:~/devAI/OpenPCDet$ pip install numpy==1.20
Collecting numpy==1.20Downloading numpy-1.20.0-cp37-cp37m-manylinux2010_x86_64.whl (15.3 MB)|████████████████████████████████| 15.3 MB 12 kB/s 
Installing collected packages: numpyAttempting uninstall: numpyFound existing installation: numpy 1.21.2Uninstalling numpy-1.21.2:Successfully uninstalled numpy-1.21.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
imageio 2.13.1 requires pillow>=8.3.2, but you have pillow 8.3.1 which is incompatible.
Successfully installed numpy-1.20.3(openmmlab) matthew@matthew-MS-7816:~/devAI/OpenPCDet$ pip install pillow==8.3.2
Collecting pillow==8.3.2Downloading Pillow-8.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)|████████████████████████████████| 3.0 MB 482 kB/s 
Installing collected packages: pillowAttempting uninstall: pillowFound existing installation: Pillow 8.3.1Uninstalling Pillow-8.3.1:Successfully uninstalled Pillow-8.3.1
Successfully installed pillow-8.3.2
(openmmlab) matthew@matthew-MS-7816:~/devAI/OpenPCDet$ python setup.py develop
.......................................
Using /home/matthew/anaconda3/envs/openmmlab/lib/python3.7/site-packages
Finished processing dependencies for pcdet==0.5.0+3fa8b51
(openmmlab) matthew@matthew-MS-7816:~/devAI/OpenPCDet$

然后python setup.py develop搞定。

最后,晒一张跑通的PV-RCNN图片

 

这篇关于安装OpenPCDet碰到的问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/813480

相关文章

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

Centos7安装Mongodb4

1、下载源码包 curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.1.tgz 2、解压 放到 /usr/local/ 目录下 tar -zxvf mongodb-linux-x86_64-rhel70-4.2.1.tgzmv mongodb-linux-x86_64-rhel70-4.2.1/

好题——hdu2522(小数问题:求1/n的第一个循环节)

好喜欢这题,第一次做小数问题,一开始真心没思路,然后参考了网上的一些资料。 知识点***********************************无限不循环小数即无理数,不能写作两整数之比*****************************(一开始没想到,小学没学好) 此题1/n肯定是一个有限循环小数,了解这些后就能做此题了。 按照除法的机制,用一个函数表示出来就可以了,代码如下

hdu1043(八数码问题,广搜 + hash(实现状态压缩) )

利用康拓展开将一个排列映射成一个自然数,然后就变成了普通的广搜题。 #include<iostream>#include<algorithm>#include<string>#include<stack>#include<queue>#include<map>#include<stdio.h>#include<stdlib.h>#include<ctype.h>#inclu

Centos7安装JDK1.8保姆版

工欲善其事,必先利其器。这句话同样适用于学习Java编程。在开始Java的学习旅程之前,我们必须首先配置好适合的开发环境。 通过事先准备好这些工具和配置,我们可以避免在学习过程中遇到因环境问题导致的代码异常或错误。一个稳定、高效的开发环境能够让我们更加专注于代码的学习和编写,提升学习效率,减少不必要的困扰和挫折感。因此,在学习Java之初,投入一些时间和精力来配置好开发环境是非常值得的。这将为我

购买磨轮平衡机时应该注意什么问题和技巧

在购买磨轮平衡机时,您应该注意以下几个关键点: 平衡精度 平衡精度是衡量平衡机性能的核心指标,直接影响到不平衡量的检测与校准的准确性,从而决定磨轮的振动和噪声水平。高精度的平衡机能显著减少振动和噪声,提高磨削加工的精度。 转速范围 宽广的转速范围意味着平衡机能够处理更多种类的磨轮,适应不同的工作条件和规格要求。 振动监测能力 振动监测能力是评估平衡机性能的重要因素。通过传感器实时监

安装nodejs环境

本文介绍了如何通过nvm(NodeVersionManager)安装和管理Node.js及npm的不同版本,包括下载安装脚本、检查版本并安装特定版本的方法。 1、安装nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash 2、查看nvm版本 nvm --version 3、安装

缓存雪崩问题

缓存雪崩是缓存中大量key失效后当高并发到来时导致大量请求到数据库,瞬间耗尽数据库资源,导致数据库无法使用。 解决方案: 1、使用锁进行控制 2、对同一类型信息的key设置不同的过期时间 3、缓存预热 1. 什么是缓存雪崩 缓存雪崩是指在短时间内,大量缓存数据同时失效,导致所有请求直接涌向数据库,瞬间增加数据库的负载压力,可能导致数据库性能下降甚至崩溃。这种情况往往发生在缓存中大量 k

6.1.数据结构-c/c++堆详解下篇(堆排序,TopK问题)

上篇:6.1.数据结构-c/c++模拟实现堆上篇(向下,上调整算法,建堆,增删数据)-CSDN博客 本章重点 1.使用堆来完成堆排序 2.使用堆解决TopK问题 目录 一.堆排序 1.1 思路 1.2 代码 1.3 简单测试 二.TopK问题 2.1 思路(求最小): 2.2 C语言代码(手写堆) 2.3 C++代码(使用优先级队列 priority_queue)