【发布时间】:2019-01-11 19:11:20
【问题描述】:
我正在为库的 python 绑定设置 boost-python。以前,boost 已安装但链接到 python2.7。在经历了一些磨难之后,之前安装的 boost 的所有内容都消失了,我正在尝试安装新的 boost。
我使用 Linux Mint 作为记录,Anaconda 使用 python 3.6.8。 它在 CLI 中正常工作:python --version 提供 3.6.8
然后我开始按照说明构建 boost :https://www.boost.org/users/history/version_1_69_0.html
我从其他线程得到的就是这样做:
sudo apt-get install python3-dev
我不确定我应该这样做,因为我有 anaconda3,但无论如何,我做到了。
./bootstrap.sh
这里创建了 project-config.jam 文件,关于 python 的行说:
using python : 3.6 : /home/myUser/anaconda3 ;
然后我继续使用 b2 构建:
sudo ./b2 --with-python -j8 install
安装失败,上面写满了文字:
./boost/python/detail/wrap_python.hpp:50:11: fatal error:
pyconfig.h: No such file or directory
# include <pyconfig.h>
^~~~~~~~~~~~
compilation terminated.
当我在 ~/anaconda3/include/python3.6m 中搜索时,pyconfig.h 文件按预期放在那里
我应该向 b2 或 bootstrap 提供其他信息吗?
【问题讨论】: