在 Python/Ubuntu 18.04 LTS 上安装 PCL 库
Install PCL Library on Python/Ubuntu 18.04 LTS
如何在 Python/Ubuntu 18.04 LTS 上安装 PCL 库?
我试过不同的方法,但没有成功。
尝试 import pcl
结果:
ImportError: libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory
将其安装为系统范围的库,而不是 Python 模块。
sudo add-apt-repository ppa:sweptlaser/python3-pcl
sudo apt update
sudo apt install python3-pcl
来自 here
感谢您到目前为止的所有回答。
我尝试了很多方法来解决这个问题,并在网上浏览了所有答案。答案中的一个缺点是此行代码:
“sudo apt-get install libpcl-dev -y”。如果你 运行 这个命令,它会安装更高版本的 libpcl-dev ,这将与你稍后安装的 libpcl-dev 1.7 发生冲突。所以请不要做任何事,听我的解决问题。以下是解决问题的一些步骤:
第一步:找到Ubuntu16source.list,将其仓库一一添加到你的Ubuntu(例如版本 20)。你可以在这个link中找到它:https://gist.github.com/rohitrawat/60a04e6ebe4a9ec1203eac3a11d4afc1
第二步: 运行 "sudo apt update", 现在libpcl-dev 1.7已经安装成功。你可以运行这个命令来查看:apt-cache policy libpcl-dev"
步骤 3: 运行: "python ”,然后“import pcl”,你会收到这样的错误:ImportError : libpcl_keypoints.so.1.7,好的,别担心,复制“libpcl_keypoints.so.1.7”并转到该网站并在其搜索框中粘贴:https://debian.pkgs.org/8/debian-main-amd64,在那里你会看到这样的:“ sudo apt-get install libpcl-keypoints1.7", 运行 在终端上.
第 4 步: 在终端输入“python”,然后“导入pcl”。你会看到另一个错误,例如:“libpcl-outofcore1.7”,再次搜索那个网站并像以前一样做步骤.
第 5 步: 有时执行第 3 步和第 4 步,直到可以成功导入 pcl。
我为我做了并为我工作:D
此外,我重复了安装PCL的过程,并准备了这些步骤来轻松解决问题。您可以按照以下步骤安装 PCL 成功。
Step1:添加Ubuntu16源列表
第二步: sudo apt-get update
step3: pip安装python-pcl
step4: sudo apt-get install libpcl-keypoints1.7
step5: sudo apt-get install libpcl-outofcore1.7
step6: sudo apt-get install libpcl-people1.7
step7: sudo apt-get install libpcl-recognition1.7
step8: sudo apt-get install libpcl-registration1.7
step9: sudo apt-get install libpcl-segmentation1.7
step10: sudo apt-get install libpcl-surface1.7
现在,如果出现错误“libpng12-0”,请执行以下操作:
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt 更新
sudo apt-get 安装 libpng12-0
Step11: sudo apt-get install libpcl-tracking1.7
第十二步: sudo apt-get install libflann1.8
Step13: sudo apt-get install libpcl-visualization1.7
第十四步: python
进口pcl
恭喜:PCL导入成功
如何在 Python/Ubuntu 18.04 LTS 上安装 PCL 库?
我试过不同的方法,但没有成功。
尝试 import pcl
结果:
ImportError: libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory
将其安装为系统范围的库,而不是 Python 模块。
sudo add-apt-repository ppa:sweptlaser/python3-pcl
sudo apt update
sudo apt install python3-pcl
来自 here
感谢您到目前为止的所有回答。
我尝试了很多方法来解决这个问题,并在网上浏览了所有答案。答案中的一个缺点是此行代码: “sudo apt-get install libpcl-dev -y”。如果你 运行 这个命令,它会安装更高版本的 libpcl-dev ,这将与你稍后安装的 libpcl-dev 1.7 发生冲突。所以请不要做任何事,听我的解决问题。以下是解决问题的一些步骤:
第一步:找到Ubuntu16source.list,将其仓库一一添加到你的Ubuntu(例如版本 20)。你可以在这个link中找到它:https://gist.github.com/rohitrawat/60a04e6ebe4a9ec1203eac3a11d4afc1
第二步: 运行 "sudo apt update", 现在libpcl-dev 1.7已经安装成功。你可以运行这个命令来查看:apt-cache policy libpcl-dev"
步骤 3: 运行: "python ”,然后“import pcl”,你会收到这样的错误:ImportError : libpcl_keypoints.so.1.7,好的,别担心,复制“libpcl_keypoints.so.1.7”并转到该网站并在其搜索框中粘贴:https://debian.pkgs.org/8/debian-main-amd64,在那里你会看到这样的:“ sudo apt-get install libpcl-keypoints1.7", 运行 在终端上.
第 4 步: 在终端输入“python”,然后“导入pcl”。你会看到另一个错误,例如:“libpcl-outofcore1.7”,再次搜索那个网站并像以前一样做步骤.
第 5 步: 有时执行第 3 步和第 4 步,直到可以成功导入 pcl。
我为我做了并为我工作:D
此外,我重复了安装PCL的过程,并准备了这些步骤来轻松解决问题。您可以按照以下步骤安装 PCL 成功。
Step1:添加Ubuntu16源列表
第二步: sudo apt-get update
step3: pip安装python-pcl
step4: sudo apt-get install libpcl-keypoints1.7
step5: sudo apt-get install libpcl-outofcore1.7
step6: sudo apt-get install libpcl-people1.7
step7: sudo apt-get install libpcl-recognition1.7
step8: sudo apt-get install libpcl-registration1.7
step9: sudo apt-get install libpcl-segmentation1.7
step10: sudo apt-get install libpcl-surface1.7
现在,如果出现错误“libpng12-0”,请执行以下操作:
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt 更新
sudo apt-get 安装 libpng12-0
Step11: sudo apt-get install libpcl-tracking1.7
第十二步: sudo apt-get install libflann1.8
Step13: sudo apt-get install libpcl-visualization1.7
第十四步: python
进口pcl
恭喜:PCL导入成功