python-pcl icon indicating copy to clipboard operation
python-pcl copied to clipboard

Error running setup.py on Ubuntu 16.04

Open anshulvj opened this issue 7 years ago • 3 comments

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

anshulvj avatar May 24 '18 22:05 anshulvj

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

VinceDT avatar Jun 12 '18 08:06 VinceDT

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.

Sirokujira avatar Aug 14 '18 23:08 Sirokujira

FYI Cython 0.25.2 can't be installed on Python 3.7 and newer

votecoffee avatar Jan 23 '21 18:01 votecoffee