Could not find the following Boost libraries: boost_python3

时间:2023-07-06 18:37:14

安装Boost.NumPy时报错:

CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1794 (message):
Unable to find the requested Boost libraries. Boost version: 1.61.0 Boost include path: /usr/include Could not find the following Boost libraries: boost_python3 Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
ycm/CMakeLists.txt:202 (find_package) Using external libclang: /usr/lib64/libclang.so.3.8
-- Found PythonInterp: /usr/bin/python3.5 (found version "3.5.2")
-- Configuring incomplete, errors occurred!
See also "/home/bstaletic/ycmd/CMakeFiles/CMakeOutput.log".
See also "/home/bstaletic/ycmd/CMakeFiles/CMakeError.log".

其实是boost安装的时候Python的环境变量不是python3.5
把环境变量改成python3.5后,再安装Boost,然后安装boost_numpy就不报这个错了。
更改环境变量也很简单。
ln -s Python3.5 /usr/bin/python