JeremyBYU / OrganizedPointFilters

MIT License
4 stars 2 forks source link

No module named 'organizedpointfilters.organizedpointfilters' #3

Closed erjiekai closed 11 months ago

erjiekai commented 3 years ago

System: Ubuntu 18.04.5 LTS 64bit

Python Error: No module named 'organizedpointfilters.organizedpointfilters'

Error appeared when trying to run python examples found in examples/python:

For example: $python /example/python/example-basic.py

OrganizedPointFilters is built with instructions as follows:

Build Project Library

1) mkdir cmake-build && cd cmake-build 2) cmake ../ -DCMAKE_BUILD_TYPE=Release . 3) cmake --build . -j$(nproc)

Build and Install Python Extension

4) cd cmake-build && cmake --build . --target python-package --config Release -j$(nproc) 5) cd lib/python_package && pip install -e .

Output from Step 2:

CMake Deprecation Warning at cmake-build/_deps/extern_eigen-src/CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Performing Test COMPILER_SUPPORT_std=cpp03
-- Performing Test COMPILER_SUPPORT_std=cpp03 - Success
-- Standard libraries to link to explicitly: none
-- Found unsuitable Qt version "5.12.9" from /home/jk/miniconda3/envs/realsense/bin/qmake
-- A cache variable, namely BLAS_DIR, has been set to specify the install directory of BLAS
-- Looking for BLAS -- mkl.h not found
-- Looking for MKL BLAS: not found
-- Looking for Goto BLAS: not found
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Looking for Open BLAS: found
-- A library with BLAS API found.
-- BLAS_LIBRARIES /usr/lib/x86_64-linux-gnu/libopenblas.so
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (CHOLMOD)
  does not match the name of the calling package (Cholmod).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindCholmod.cmake:86 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/test/CMakeLists.txt:49 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (UMFPACK)
  does not match the name of the calling package (Umfpack).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindUmfpack.cmake:50 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/test/CMakeLists.txt:60 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (SUPERLU)
  does not match the name of the calling package (SuperLU).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindSuperLU.cmake:93 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/test/CMakeLists.txt:71 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- A version of Pastix has been found but pastix_nompi.h does not exist in the include directory. Because Eigen tests require a version without MPI, we disable the Pastix backend.
-- Found unsuitable Qt version "5.12.9" from /home/jk/miniconda3/envs/realsense/bin/qmake
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (GOOGLEHASH)
  does not match the name of the calling package (GoogleHash).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindGoogleHash.cmake:21 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/unsupported/test/CMakeLists.txt:24 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find GOOGLEHASH (missing: GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE) 
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (ADOLC) does
  not match the name of the calling package (Adolc).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindAdolc.cmake:17 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/unsupported/test/CMakeLists.txt:34 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find ADOLC (missing: ADOLC_INCLUDES ADOLC_LIBRARIES) 
-- Could NOT find MPFR (missing: MPFR_INCLUDES MPFR_LIBRARIES MPFR_VERSION_OK) (Required is at least version "2.3.0")
-- Could NOT find GMP (missing: GMP_INCLUDES GMP_LIBRARIES) 
-- Could NOT find FFTW (missing: FFTW_INCLUDES FFTW_LIBRARIES) 
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/unsupported/test/CMakeLists.txt:97 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.0")
-- Found unsuitable Qt version "5.12.9" from /home/jk/miniconda3/envs/realsense/bin/qmake
-- Qt4 not found, so disabling the mandelbrot and opengl demos
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (CHOLMOD)
  does not match the name of the calling package (Cholmod).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindCholmod.cmake:86 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/bench/spbench/CMakeLists.txt:16 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (UMFPACK)
  does not match the name of the calling package (Umfpack).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindUmfpack.cmake:50 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/bench/spbench/CMakeLists.txt:24 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (SUPERLU)
  does not match the name of the calling package (SuperLU).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-build/_deps/extern_eigen-src/cmake/FindSuperLU.cmake:93 (find_package_handle_standard_args)
  cmake-build/_deps/extern_eigen-src/bench/spbench/CMakeLists.txt:32 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- A version of Pastix has been found but pastix_nompi.h does not exist in the include directory. Because Eigen tests require a version without MPI, we disable the Pastix backend.
-- ************************************************************
-- ***    Eigen's unit tests configuration summary          ***
-- ************************************************************
-- 
-- Build type:        Release
-- Build site:        luolc-hp
-- Build string:      linux-5.4.0-80-generic-_-7.5.0-sse2-64bit
-- Enabled backends:  Cholmod,  UmfPack,  SuperLU,  SPQR,  Boost.Multiprecision, 
-- Disabled backends: PaStiX,  METIS,  Qt4 support,  GoogleHash,  Adolc,  MPFR C++,  fftw,  OpenGL, 
-- Default order:     Column-major
-- Maximal matrix/vector size: 320
-- SSE2:              Using architecture defaults
-- SSE3:              Using architecture defaults
-- SSSE3:             Using architecture defaults
-- SSE4.1:            Using architecture defaults
-- SSE4.2:            Using architecture defaults
-- AVX:               Using architecture defaults
-- FMA:               Using architecture defaults
-- AVX512:            Using architecture defaults
-- Altivec:           Using architecture defaults
-- VSX:               Using architecture defaults
-- ARM NEON:          Using architecture defaults
-- ARMv8 NEON:        Using architecture defaults
-- S390X ZVECTOR:     Using architecture defaults
-- C++11:             OFF
-- SYCL:              OFF
-- CUDA:              OFF
-- 
CXX:               /usr/bin/c++
 CXX_VERSION:       c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
 CXX_FLAGS:          -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wlogical-op -Wdouble-promotion -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -ansi
 Sparse lib flags:   ;/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libamd.so;/usr/lib/x86_64-linux-gnu/libcolamd.so;/usr/lib/x86_64-linux-gnu/libcamd.so;/usr/lib/x86_64-linux-gnu/libccolamd.so;eigen_blas;eigen_lapack;/usr/lib/x86_64-linux-gnu/libumfpack.so;/usr/lib/x86_64-linux-gnu/libcolamd.so;/usr/lib/x86_64-linux-gnu/libamd.so;/usr/lib/x86_64-linux-gnu/libcholmod.so;eigen_blas;/usr/lib/x86_64-linux-gnu/libsuperlu.so;eigen_blas;/usr/lib/x86_64-linux-gnu/libspqr.so;/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libamd.so;/usr/lib/x86_64-linux-gnu/libcolamd.so;/usr/lib/x86_64-linux-gnu/libcamd.so;/usr/lib/x86_64-linux-gnu/libccolamd.so;eigen_lapack;eigen_blas;/usr/lib/x86_64-linux-gnu/liblapack.so

-- ************************************************************
-- 
-- Configured Eigen 3.3.7
-- 
-- Some things you can do now:
-- --------------+--------------------------------------------------------------
-- Command       |   Description
-- --------------+--------------------------------------------------------------
-- make install  | Install Eigen. Headers will be installed to:
--               |     <CMAKE_INSTALL_PREFIX>/<INCLUDE_INSTALL_DIR>
--               |   Using the following values:
--               |     CMAKE_INSTALL_PREFIX: /usr/local
--               |     INCLUDE_INSTALL_DIR:  include/eigen3
--               |   Change the install location of Eigen headers using:
--               |     cmake . -DCMAKE_INSTALL_PREFIX=yourprefix
--               |   Or:
--               |     cmake . -DINCLUDE_INSTALL_DIR=yourdir
-- make doc      | Generate the API documentation, requires Doxygen & LaTeX
-- make check    | Build and run the unit-tests. Read this page:
--               |   http://eigen.tuxfamily.org/index.php?title=Tests
-- make blas     | Build BLAS library (not the same thing as Eigen)
-- make uninstall| Removes files installed by make install
-- --------------+--------------------------------------------------------------
-- 
-- pybind11 v2.4.3
-- Configuring release build
-- Using Python executable: /usr/bin/python3.6
-- Using Python version: 3.6
-- Using Python version major: 3
-- PYPI_PACKAGE_NAME: organizedpointfilters
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jk/polylidar/OrganizedPointFilters/cmake-build

Please Help!

sivashankar28 commented 2 years ago

It looks like you built it correctly. To get the examples to run... I would execute the files without being in the last python folder. If you cd .. out of it. Then run python -m python.example.all This should work for you

JeremyBYU commented 2 years ago

I agree, looks like the configuration step of CMake succeeded. All those errors and warnings are "normal" and are from other repos like Eigen which I am using.

However you will still need to build the project as per the instructions. Then there are a few more steps to install the compiled python module (should also be documented in readme).

Good luck.