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

相关文章

Windows环境下解决Matplotlib中文字体显示问题的详细教程

《Windows环境下解决Matplotlib中文字体显示问题的详细教程》本文详细介绍了在Windows下解决Matplotlib中文显示问题的方法,包括安装字体、更新缓存、配置文件设置及编码調整,并... 目录引言问题分析解决方案详解1. 检查系统已安装字体2. 手动添加中文字体(以SimHei为例)步骤

JAVA中安装多个JDK的方法

《JAVA中安装多个JDK的方法》文章介绍了在Windows系统上安装多个JDK版本的方法,包括下载、安装路径修改、环境变量配置(JAVA_HOME和Path),并说明如何通过调整JAVA_HOME在... 首先去oracle官网下载好两个版本不同的jdk(需要登录Oracle账号,没有可以免费注册)下载完

SpringSecurity整合redission序列化问题小结(最新整理)

《SpringSecurity整合redission序列化问题小结(最新整理)》文章详解SpringSecurity整合Redisson时的序列化问题,指出需排除官方Jackson依赖,通过自定义反序... 目录1. 前言2. Redission配置2.1 RedissonProperties2.2 Red

nginx 负载均衡配置及如何解决重复登录问题

《nginx负载均衡配置及如何解决重复登录问题》文章详解Nginx源码安装与Docker部署,介绍四层/七层代理区别及负载均衡策略,通过ip_hash解决重复登录问题,对nginx负载均衡配置及如何... 目录一:源码安装:1.配置编译参数2.编译3.编译安装 二,四层代理和七层代理区别1.二者混合使用举例

Java JDK1.8 安装和环境配置教程详解

《JavaJDK1.8安装和环境配置教程详解》文章简要介绍了JDK1.8的安装流程,包括官网下载对应系统版本、安装时选择非系统盘路径、配置JAVA_HOME、CLASSPATH和Path环境变量,... 目录1.下载JDK2.安装JDK3.配置环境变量4.检验JDK官网下载地址:Java Downloads

SQL server数据库如何下载和安装

《SQLserver数据库如何下载和安装》本文指导如何下载安装SQLServer2022评估版及SSMS工具,涵盖安装配置、连接字符串设置、C#连接数据库方法和安全注意事项,如混合验证、参数化查... 目录第一步:打开官网下载对应文件第二步:程序安装配置第三部:安装工具SQL Server Manageme

怎样通过分析GC日志来定位Java进程的内存问题

《怎样通过分析GC日志来定位Java进程的内存问题》:本文主要介绍怎样通过分析GC日志来定位Java进程的内存问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、GC 日志基础配置1. 启用详细 GC 日志2. 不同收集器的日志格式二、关键指标与分析维度1.

Java 线程安全与 volatile与单例模式问题及解决方案

《Java线程安全与volatile与单例模式问题及解决方案》文章主要讲解线程安全问题的五个成因(调度随机、变量修改、非原子操作、内存可见性、指令重排序)及解决方案,强调使用volatile关键字... 目录什么是线程安全线程安全问题的产生与解决方案线程的调度是随机的多个线程对同一个变量进行修改线程的修改操

Python中win32包的安装及常见用途介绍

《Python中win32包的安装及常见用途介绍》在Windows环境下,PythonWin32模块通常随Python安装包一起安装,:本文主要介绍Python中win32包的安装及常见用途的相关... 目录前言主要组件安装方法常见用途1. 操作Windows注册表2. 操作Windows服务3. 窗口操作

Redis出现中文乱码的问题及解决

《Redis出现中文乱码的问题及解决》:本文主要介绍Redis出现中文乱码的问题及解决,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1. 问题的产生2China编程. 问题的解决redihttp://www.chinasem.cns数据进制问题的解决中文乱码问题解决总结