我正在尝试在我的Ubuntu上构建boost python库。然而,当我执行以下命令时:
./b2 --with-python
我经常遇到与此相关的错误:
./boost/python/detail/wrap_python.hpp:57:11: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h>
^~~~~~~~~~~~
我尝试在网上查找,例如,https://github.com/boostorg/build/issues/289
按照他们的建议,我检查了我的 "project-config.jam" 文件,并发现
# Python configuration
import python ;
if ! [ python.configured ]
{
using python : 3.7 : /home/lowlimb/anaconda3 :/home/lowlimb/anaconda3/include/python3.7m;
}
哪个是正确的,因此我真的不知道如何解决这个问题。 有人可以给我一些建议吗?