strawlab / python-pcl

Python bindings to the pointcloud library (pcl)
http://strawlab.github.com/python-pcl/
Other
2k stars 701 forks source link

Unable to install - Ubuntu 20, Python3.8 #417

Open jstmn opened 1 year ago

jstmn commented 1 year ago

I'm unable to install this package on Ubuntu 20 with python3.8

Your Environment

Context

When running pip install -e . i'm getting the following error:

(venv) [ torchship: ~/Libraries/python-pcl ] $ pip install -e .
Obtaining file:///home/jstm/Libraries/python-pcl
    ERROR: Command errored out with exit status 1:
     command: /home/jstm/Libraries/python-pcl/venv/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/jstm/Libraries/python-pcl/setup.py'"'"'; __file__='"'"'/home/jstm/Libraries/python-pcl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /home/jstm/Libraries/python-pcl/
    Complete output (6 lines):
    /home/jstm/Libraries/python-pcl/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-1.6
        pkg-config pcl_common
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Expected Behavior

The package should install

Current Behavior

This error is happening and setup.py is aborted

Code to Reproduce

sudo apt install libpcl-dev # per https://pointclouds.org/downloads/#:~:text=sudo%20apt%20install%20libpcl%2Ddev
cd /tmp
git clone git@github.com:strawlab/python-pcl.git
cd python-pcl
python3.8 -m venv temp_venv/
source temp_venv/bin/activate
pip install numpy cython
pip install -e .

Possible Solution

yanglh14 commented 1 year ago

I met the same problem and got it solved using: https://github.com/lianghongzhuo/PointNetGPD/issues/47#issuecomment-1033421245.

Hope it can help you!