0
点赞
收藏
分享

微信扫一扫

ubuntu18.04安装python_pcl遇到的问题及解决步骤

烟中雯城 2022-01-21 阅读 84
python

为了在python环境下使用pcl工具包,需要安装python_pcl.

计算机环境:ubuntu18.04,python3.6

步骤如下:

  1. 安装c++版本的pcl(
sudo apt install libpcl-dev

执行这句命令默认安装的是pcl1.8

  1. 安装python-pcl
pip3 install python-pcl

执行这句命令默认安装python-pcl是与pcl1.7对应的,上一步提到默认安装的是pcl1.8,因此在import pcl时会出现错误:“ImportError: libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory”。

  1. 为了解决版本不对应的问题,需要安装一个wheel文件。首先下载文件python_pcl-0.3.0rc1-cp36-cp36m-linux_x86_64.whl(地址)到一个文件夹,然后进入这个文件夹,执行下面指令
pip3 install python_pcl-0.3.0rc1-cp36-cp36m-linux_x86_64.whl

特别注意,不同版本的python对应不同版本的wheel文件,否则会报错***.whl is not a supported wheel on this platform.

  1. 此时如果numpy版本较新,可能会出现如下错误:“ Non-string object detected for the array ordering. Please pass in ‘C’, ‘F’, ‘A’, or ‘K’ instead", 降低numpy版本即可
pip3 uninstall numpy
pip3 install numpy==1.17.5
举报

相关推荐

0 条评论