strawlab/python-pcl

MacOS python setup.py install--fatal error: 'vtkObjectBase.h' file not found

Opened this issue · 2 comments

Your Environment

  • Operating System and version: macOS Catalina
  • Compiler:
  • PCL Version: 1.9
  • Python version: 3.7.4
  • Cython Version: 0.29.13

Hi All,

I'm having trouble installing python-pcl onto my Mac. I tried using conda and that failed greatly using both python 2.7 and 3.6, so I'm going to normal route and installing with pip.
When navigating to the python-pcl folder and running

python setup.py install

I get hit with the error pcl/pcl_visualization.cpp:633:10: fatal error: 'vtkObjectBase.h' file not found

I tried reinstalling boost with home-brew multiple times and still cannot resolve this error. It looks like the setup.py script can't find my boost directory under usr/local/cellar/include because it is omitted from the error output:

local/anaconda3/include -I/usr/local/anaconda3/include -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/usr/local/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.9.1_4/include/pcl-1.9 -I/usr/local/Cellar/flann/1.9.1_7/include -I/usr/local/Cellar/pcl/1.9.1_4/include/pcl-1.9 -I/usr/local/Cellar/eigen/3.3.7/include/eigen3 -I/usr/include/ni -I/usr/include/openni2 -I/usr/local/Cellar/vtk/8.2.0/include/vtk-8.2 -I/usr/local/anaconda3/include/python3.7m -c pcl/pcl_visualization.cpp -o build/temp.macosx-10.7-x86_64-3.7/pcl/pcl_visualization.o -stdlib=libc++ -mmacosx-version-min=10.9 -std=c++11

Any help would be appreciated, thanks!

I got the same issue. During homebrew, I see it was installing pcl with Mojave version.
"==> Pouring pcl-1.9.1_4.mojave.bottle.1.tar.gz"
This might be the cause.

Check the name of the VTK version installed on your system. The compiler flag is:
"-I/usr/local/Cellar/vtk/8.2.0/include/vtk-8.2"
If this directory does not exist, then the library includes will not be found.

For instance, I had to replace line 710 of setup.py by:
vtk_version = '8.2.0_5'