python-pcl
python-pcl copied to clipboard
Error running setup.py on Ubuntu 16.04
I followed the instructions, have pcl and other dependencies install. Yet I get the error when I run the setup file:
:~/python-pcl-master$ python setup.py build_ext -i
running build_ext
cythoning pcl/_pcl_180.pyx to pcl/_pcl_180.cpp
Error compiling Cython file:
------------------------------------------------------------
...
# \param[out] cloud_out the resultant output point cloud dataset
# \note Assumes unique indices.
# \ingroup common
# template <typename PointT> void copyPointCloud (const pcl::PointCloud<PointT> &cloud_in, const std::vector<int, Eigen::aligned_allocator<int> > &indices, pcl::PointCloud<PointT> &cloud_out);
cdef extern from "pcl/common/io.h" namespace "pcl":
cdef void copyPointCloud_Indices2 "pcl::copyPointCloud" [PointT](const cpp.PointCloud[PointT]* &cloud_in, const vector[int, eigen3.aligned_allocator_t] &indices, cpp.PointCloud[PointT] &cloud_out)
^
------------------------------------------------------------
pcl/pcl_common.pxd:3227:123: vector templated type receives 1 arguments, got 2
Error compiling Cython file:
------------------------------------------------------------
...
###############################################################################
cdef extern from "indexing.hpp" nogil:
# cdef extern from "indexing.hpp":
# Use these instead of operator[] or at.
PointCloudType *getptr [PointCloudType](cpp.PointCloud[PointCloudType] *, size_t)
^
------------------------------------------------------------
pcl/indexing.pxd:13:4: 'PointCloudType' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
I have attached the complete error file. Error.docx
Any pointers will be useful. Thanks
Had the same issue, which was probably related to package versions, installation in a virtual environment worked for me:
in python-pcl folder:
virtualenv -v virtual_build_env source virtual_build_env/bin/activate pip install --upgrade pip pip install cython==0.25.2 pip install numpy python setup.py build_ext -i python setup.py install --user
test installation: python examples/official/Filtering/PassThroughFilter.py
We have confirmed that the same phenomenon occurs when Cython 0.28 is installed. As for correspondence, we will correspond with the next version.
For now, please specify version 0.25.2 of Cython.
FYI Cython 0.25.2 can't be installed on Python 3.7 and newer