Boost compile libboost_python3

The Linux system comes with python2.7, libboost_python27.so will be generated after boost is compiled, but some applications require libboost_python3, so let's compile it.

Enter the boost source file directory boost_1_67_0, configure only to compile python, and the python path points to python3.6 in anaconda3.

./bootstrap --with-libraries=python --with-toolset=gcc
./b2 --with-python include="/qp/3rd/anaconda3/include/python3.6m/"
sudo ./b2 install

After successful compilation and installation, there will be libboost_python36.so and libboost_python36.a under /usr/local/lib, and some application links need libboost_python3.so or libboost_python3.a. Let's build a soft link:

cd /usr/local/lib
sudo ln -s libboost_python-py36.so libboost_python3.so
sudo ln -s libboost_python-py36.a libboost_python3.a
You're done!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324499828&siteId=291194637