lianghongzhuo / pygpg

Python binding for Grasp Pose Generator (pyGPG)
https://lianghongzhuo.github.io/pygpg/
29 stars 4 forks source link

Issue Building pygpg: `fatal error: pcl/visualization/pcl_visualizer.h: No such file or directory` #4

Closed cremebrule closed 10 months ago

cremebrule commented 10 months ago

Hi @lianghongzhuo !

Huge thanks for putting this package together, it is very useful! I'm trying to install pygpg, but run into issues building, because I get the error:

fatal error: pcl/visualization/pcl_visualizer.h: No such file or directory

I've tried multiple channels -- conda-forge, davidcaron, sirokujira, etc. -- It seems most, if not all, of the conda pcl packages do not ship with pcl_visualization.

Which pcl package did you install? Or is there perhaps an alternative method I should be considering for installation?

I've tried both python 3.8 and 3.10, and neither has worked either, so perhaps it's a python version issue?

Any help would be appreciated, huge thanks!

lianghongzhuo commented 10 months ago

could you check your pcl version? conda list |grep pcl

lianghongzhuo commented 10 months ago

I use the pcl from conda-forge: conda install -c conda-forge pcl

lianghongzhuo commented 10 months ago

The most recent version, 1.13.1, works on my side.

cremebrule commented 10 months ago

Thanks for the rapid response! Yeah, I've tried using that version multiple times (and tried the other variations shown on the conda-forge page, but none of them seemed to work. And it seems the version mismatch may be the issue! When I do the following:

$ conda create -y -n gpg python=3.10
$ conda activate gpg
$ (gpg) conda install cmake boost
$ (gpg) conda install -c conda-forge pcl

Running conda list pcl shows version 1.9.1, which is definitely not the version you have 1.13.1. I wonder if it's a mismatch between the channels from which cmake and boost are installed vs. conda-forge?

I'll try adding conda-forge as a channel for the env and then running conda install cmake pcl boost together and see if that works, since before running conda install cmake pcl boost failed.

cremebrule commented 10 months ago

Hmmm even with trying to install them at once, conda fails the frozen solve and ultimately it tries to download version linux-64/pcl-1.9.1-h482114b_1002.tar.bz2

lianghongzhuo commented 10 months ago

Using mamba will accelerate your conda experience. I also found this issues, try installing mamba and then running mamba install pcl cmake boost, (put pcl to the first)

cremebrule commented 10 months ago

Great suggestion! That actually solved my problem completely. I've never actually used mamba previously, but after this I think I'm going to port over from conda...

Installation now runs smoothly as well!

Might be good to update the README as well too, since anyone else trying to use Conda is likely going to run into the same issue.

Huge thanks for the assistance! Closed this question.