Я собрал Python и установил его согласно нашим инструкциям в Как собрать и установить Python 3.13 без sudo.
При попытке собрать boost::python просто с --with-python он не может найти заголовочные файлы Python:
boost_python_config.txt
warning: No python installation configured and autoconfiguration
note: failed. See http://www.boost.org/libs/python/doc/building.html
note: for configuration instructions or pass --without-python to
note: suppress this message and silently skip all Boost.Python targetsЧтобы решить эту проблему, создайте tools/build/src/user-config.jam со следующим содержимым:
user-config.jam
using python
: 3.13
: ~/usr/bin/python3.13
: ~/usr/include/python3.13
: ~/usr/lib
;Затем соберите boost::python следующей командой:
build_boost_python.sh
./b2 install --with-python --prefix=$HOME/usr include=~/usr/include/python3.13Не забудьте заменить 3.13 на фактически установленную версию и ~/usr на фактически использованный префикс установки.
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow