python-pcl
python-pcl copied to clipboard
Fail to import pcl in Ubuntu 16.04
I installed pcl via sudo apt install libpcl-dev
and then installed python-pcl
.
The build process looked good, but I could not import pcl in python.
In [1]: import pcl
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-dcd28fa30e40> in <module>()
----> 1 import pcl
/data/wanggu/anaconda3/envs/py27/lib/python2.7/site-packages/pcl/__init__.py in <module>()
1 # XXX do a more specific import!
----> 2 from ._pcl import *
3 # vtkSmartPointer.h error (Linux)
4 # from .pcl_visualization import *
5 # from .pcl_grabber import *
ImportError: /usr/lib/x86_64-linux-gnu/libpcl_visualization.so.1.7: undefined symbol: _ZN3pcl9PCDWriter10writeASCIIERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNSC_10QuaternionIfLi0EEEi
How can I fix this problem?
Same problem here!
怎么解决啊老哥
I met the same problem! @wangg12 have you solved it? when executing ldd _pcl.cpython-36m-x86_64-linux-gnu.so: linux-vdso.so.1 => (0x00007fff71bac000) libpcl_registration.so.1.8 => not found libpcl_segmentation.so.1.8 => not found libpcl_features.so.1.8 => not found libpcl_ml.so.1.8 => not found libpcl_surface.so.1.8 => not found libpcl_tracking.so.1.8 => not found libpcl_filters.so.1.8 => not found libpcl_sample_consensus.so.1.8 => not found libpcl_visualization.so.1.8 => not found libpcl_io.so.1.8 => not found libpcl_search.so.1.8 => not found libpcl_kdtree.so.1.8 => not found libflann_cpp.so.1.8 => /usr/lib/x86_64-linux-gnu/libflann_cpp.so.1.8 (0x00007fa034179000) libpcl_octree.so.1.8 => not found libpcl_common.so.1.8 => not found libpython3.6m.so.1.0 => /home/cyc/anaconda3/lib/libpython3.6m.so.1.0 (0x00007fa033c35000) libboost_system.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 (0x00007fa033a31000) libstdc++.so.6 => /home/cyc/anaconda3/lib/libstdc++.so.6 (0x00007fa0336f7000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa0333ee000) libgcc_s.so.1 => /home/cyc/anaconda3/lib/libgcc_s.so.1 (0x00007fa0331dc000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa032fbf000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa032bf5000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa0329f1000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fa0327ee000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa0325e6000) /lib64/ld-linux-x86-64.so.2 (0x00007fa034775000) and i find all these files locate in /usr/locate/bin/
How could solve it?
@cyc790 Sorry, I've not solved it yet.
Facing the same issue :(
@Jyothikumar-b Please try this
- $ sudo pip install cython
- clone this repo https://github.com/udacity/RoboND-Perception-Exercises/tree/master/python-pcl
- $ cd python-pcl
- $ python setup.py build
- $ sudo python setup.py install
- $ sudo apt-get install pcl-tools
Restart the system.. try import pcl
Anybody got the solution?
@mkt1412
Did you try these steps?
$ sudo pip install cython
clone this repo https://github.com/udacity/RoboND-Perception-Exercises/tree/master/python-pcl
$ cd python-pcl
$ python setup.py build
$ sudo python setup.py install
$ sudo apt-get install pcl-tools
Restart the system.. try import pcl
In python setup.py build got error setup.py: error: cannot find PCL, tried pkg-config pcl_common-1.9 pkg-config pcl_common-1.8 pkg-config pcl_common-1.7 pkg-config pcl_common
some problem, tried every solution but still fail to import (in Ubuntu 18.04).
simply run this in your terminal:
sudo apt-get install libpcl-visualization1.7
And if you further run into this error: ImportError: libflann_cpp.so.1.8: cannot open shared object file: No such file or directory, then run:
sudo apt-get install libflann1.8
Then you should be good!