I am trying to install PyBoW3 on Ubuntu 22.04.02 LTS with Python 3.10.9 and Boost 1.74.0. However, I encountered the following error:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package):
  Could not find a package configuration file provided by
  "boost_python-py310" (requested version 1.74.0) with any of the following
  names:

    boost_python-py310Config.cmake
    boost_python-py310-config.cmake

  Add the installation prefix of "boost_python-py310" to CMAKE_PREFIX_PATH or
  set "boost_python-py310_DIR" to a directory containing one of the above
  files.  If "boost_python-py310" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component)
  /usr/share/cmake-3.22/Modules/FindBoost.cmake:594 (find_package)
  CMakeLists.txt:127 (FIND_PACKAGE)

Below is the relevant Cmake code where the error occurs:

IF (NOT UNIX)
  SET(Boost_USE_STATIC_LIBS ON)
  add_definitions(-DBOOST_PYTHON_STATIC_LIB)
ENDIF()
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_STATIC_RUNTIME OFF)
SET(BOOST_ALL_NO_LIB ON)

FIND_PACKAGE(Boost 1.54)

if (NOT UNIX)
  FIND_PACKAGE(Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)
elseif(APPLE)   
  FIND_PACKAGE(Boost 1.54 COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)
else()
  FIND_PACKAGE(Boost 1.54 COMPONENTS python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)# this is where the error occurs
endif()

# This is a hack, since DBoW3 report weird library path
if (UNIX)
  LINK_DIRECTORIES(${DBoW3_INCLUDE_DIRS}/../lib)
else()
  LINK_DIRECTORIES(../install/DBow3/build/bin/Release)
endif()

I tried to install libboost-all-dev using sudo apt-get install libboost-all-dev. I also tried to search for boost_python-py310Config.cmake and boost_python-py310-config.cmake, but couldn't find them.

(base) ojy@LAPTOP-I57TGGMF:~/gits/pyDBoW3$ locate boost_python
/usr/lib/x86_64-linux-gnu/libboost_python310.a
/usr/lib/x86_64-linux-gnu/libboost_python310.so
/usr/lib/x86_64-linux-gnu/libboost_python310.so.1.74.0
/usr/lib/x86_64-linux-gnu/cmake/boost_python-1.74.0
/usr/lib/x86_64-linux-gnu/cmake/boost_python-1.74.0/boost_python-config-version.cmake
/usr/lib/x86_64-linux-gnu/cmake/boost_python-1.74.0/boost_python-config.cmake
/usr/lib/x86_64-linux-gnu/cmake/boost_python-1.74.0/libboost_python-variant-shared-py3.10.cmake
/usr/lib/x86_64-linux-gnu/cmake/boost_python-1.74.0/libboost_python-variant-static-py3.10.cmake
0

There are 0 best solutions below