安装boost_1_66_0
cd boost_1_66_0
./bootstrap.sh --with-python=python3 --with-python-root=/home/lenovo/env/python-3.6.8 --with-python-version=3.6
./b2 include="/home/lenovo/env/python-3.6.8/include/python3.6m"
./b2 install --prefix=/usr
ldconfig
遇到的问题:boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h No such file or directory
vim boost_1_66_0/tools/build/src/tools/python.jam:547
把includes ?= $(prefix)/include/python$(version) ;
改成includes ?= $(prefix)/include/python$(version)m ;
然后在重复编译一次即可