安装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

相关文章

大数据小内存排序问题如何巧妙解决

《大数据小内存排序问题如何巧妙解决》文章介绍了大数据小内存排序的三种方法:数据库排序、分治法和位图法,数据库排序简单但速度慢,对设备要求高;分治法高效但实现复杂;位图法可读性差,但存储空间受限... 目录三种方法:方法概要数据库排序(http://www.chinasem.cn对数据库设备要求较高)分治法(常

Vue项目中Element UI组件未注册的问题原因及解决方法

《Vue项目中ElementUI组件未注册的问题原因及解决方法》在Vue项目中使用ElementUI组件库时,开发者可能会遇到一些常见问题,例如组件未正确注册导致的警告或错误,本文将详细探讨这些问题... 目录引言一、问题背景1.1 错误信息分析1.2 问题原因二、解决方法2.1 全局引入 Element

python管理工具之conda安装部署及使用详解

《python管理工具之conda安装部署及使用详解》这篇文章详细介绍了如何安装和使用conda来管理Python环境,它涵盖了从安装部署、镜像源配置到具体的conda使用方法,包括创建、激活、安装包... 目录pytpshheraerUhon管理工具:conda部署+使用一、安装部署1、 下载2、 安装3

关于@MapperScan和@ComponentScan的使用问题

《关于@MapperScan和@ComponentScan的使用问题》文章介绍了在使用`@MapperScan`和`@ComponentScan`时可能会遇到的包扫描冲突问题,并提供了解决方法,同时,... 目录@MapperScan和@ComponentScan的使用问题报错如下原因解决办法课外拓展总结@

MybatisGenerator文件生成不出对应文件的问题

《MybatisGenerator文件生成不出对应文件的问题》本文介绍了使用MybatisGenerator生成文件时遇到的问题及解决方法,主要步骤包括检查目标表是否存在、是否能连接到数据库、配置生成... 目录MyBATisGenerator 文件生成不出对应文件先在项目结构里引入“targetProje

C#使用HttpClient进行Post请求出现超时问题的解决及优化

《C#使用HttpClient进行Post请求出现超时问题的解决及优化》最近我的控制台程序发现有时候总是出现请求超时等问题,通常好几分钟最多只有3-4个请求,在使用apipost发现并发10个5分钟也... 目录优化结论单例HttpClient连接池耗尽和并发并发异步最终优化后优化结论我直接上优化结论吧,

Java内存泄漏问题的排查、优化与最佳实践

《Java内存泄漏问题的排查、优化与最佳实践》在Java开发中,内存泄漏是一个常见且令人头疼的问题,内存泄漏指的是程序在运行过程中,已经不再使用的对象没有被及时释放,从而导致内存占用不断增加,最终... 目录引言1. 什么是内存泄漏?常见的内存泄漏情况2. 如何排查 Java 中的内存泄漏?2.1 使用 J

numpy求解线性代数相关问题

《numpy求解线性代数相关问题》本文主要介绍了numpy求解线性代数相关问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 在numpy中有numpy.array类型和numpy.mat类型,前者是数组类型,后者是矩阵类型。数组

解决systemctl reload nginx重启Nginx服务报错:Job for nginx.service invalid问题

《解决systemctlreloadnginx重启Nginx服务报错:Jobfornginx.serviceinvalid问题》文章描述了通过`systemctlstatusnginx.se... 目录systemctl reload nginx重启Nginx服务报错:Job for nginx.javas

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨