cmpute/pcl.py

pip installation failes

Erol444 opened this issue · 2 comments

Hello,
I tried installing your awesome library but unfortunately, I wasn't successful.

Python: 3.6
OS: Ubuntu 20.10
numpy: 1.19.4
cython: 0.29.25

At first, it says you need scikit-build installed. After installing that, I get this error message below. Any guidelines on how to install this library? Thanks!

~$ pip install pcl-py
Defaulting to user installation because normal site-packages is not writeable
Collecting pcl-py
  Using cached pcl-py-0.2.11.tar.gz (291 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.11 in ./.local/lib/python3.6/site-packages (from pcl-py) (1.19.4)
Building wheels for collected packages: pcl-py
  Building wheel for pcl-py (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wfj54ivo
       cwd: /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/
  Complete output (91 lines):
  
  
  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 10.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 10.3.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - success
  --------------------------------------------------------------------------------
  
  Configuring Project
    Working directory:
      /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-build
    Command:
      cmake /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6 -DPYTHON_VERSION_STRING:STRING=3.6.14 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/erik/.local/lib/python3.6/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
  
  -- The C compiler identification is GNU 10.3.0
  -- The CXX compiler identification is GNU 10.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.14")
  -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found version "3.6.14")
  -- Found Cython: /home/erik/.local/bin/cython
  -- Found NumPy: /usr/include (found version "1.19.4")
  CMake Error at pcl/CMakeLists.txt:1 (find_package):
    By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "PCL", but
    CMake did not find one.
  
    Could not find a package configuration file provided by "PCL" with any of
    the following names:
  
      PCLConfig.cmake
      pcl-config.cmake
  
    Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
    to a directory containing one of the above files.  If "PCL" provides a
    separate development package or SDK, be sure it has been installed.
  
  
  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-build/CMakeFiles/CMakeOutput.log".
  Traceback (most recent call last):
    File "/home/erik/.local/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 590, in setup
      languages=cmake_languages
    File "/home/erik/.local/lib/python3.6/site-packages/skbuild/cmaker.py", line 248, in configure
      os.path.abspath(CMAKE_BUILD_DIR())))
  
  An error occurred while configuring with CMake.
    Command:
      cmake /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6 -DPYTHON_VERSION_STRING:STRING=3.6.14 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/erik/.local/lib/python3.6/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1
    Working directory:
      /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for pcl-py
  Running setup.py clean for pcl-py
Failed to build pcl-py
Installing collected packages: pcl-py
    Running setup.py install for pcl-py ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-w4rln4nn/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/erik/.local/include/python3.6m/pcl-py
         cwd: /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/
    Complete output (91 lines):
    
    
    --------------------------------------------------------------------------------
    -- Trying "Ninja" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    -- The C compiler identification is GNU 10.3.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- The CXX compiler identification is GNU 10.3.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_cmake_test_compile/build
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Ninja" generator - success
    --------------------------------------------------------------------------------
    
    Configuring Project
      Working directory:
        /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-build
      Command:
        cmake /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6 -DPYTHON_VERSION_STRING:STRING=3.6.14 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/erik/.local/lib/python3.6/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
    
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.14")
    -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found version "3.6.14")
    -- Found Cython: /home/erik/.local/bin/cython
    -- Found NumPy: /usr/include (found version "1.19.4")
    CMake Error at pcl/CMakeLists.txt:1 (find_package):
      By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "PCL", but
      CMake did not find one.
    
      Could not find a package configuration file provided by "PCL" with any of
      the following names:
    
        PCLConfig.cmake
        pcl-config.cmake
    
      Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
      to a directory containing one of the above files.  If "PCL" provides a
      separate development package or SDK, be sure it has been installed.
    
    
    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-build/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "/home/erik/.local/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 590, in setup
        languages=cmake_languages
      File "/home/erik/.local/lib/python3.6/site-packages/skbuild/cmaker.py", line 248, in configure
        os.path.abspath(CMAKE_BUILD_DIR())))
    
    An error occurred while configuring with CMake.
      Command:
        cmake /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6 -DPYTHON_VERSION_STRING:STRING=3.6.14 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/erik/.local/lib/python3.6/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
      Source directory:
        /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1
      Working directory:
        /tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/_skbuild/linux-x86_64-3.6/cmake-build
    Please see CMake's output for more information.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2atcbffr/pcl-py_2db27ed945c24aedaed19a5fbee106b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-w4rln4nn/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/erik/.local/include/python3.6m/pcl-py Check the logs for full command output.

Hi, thanks for your interest! You need to install C++ version of the PCL library first, you can run sudo apt install libpcl-dev on Ubuntu. After that the compilation should be ok

Hello @cmpute, that worked, thank you!

(FWIW you might want to make in clearer in Installation that you need to install dependencies, so C++ PCL library)