使用 brew 为 python3 安装 boost-python

Installing boost-python for python3 using brew

我正在尝试使用 brew install --build-from-source --fresh -vd --with-python3 boost-python 在 OSX 上安装 boost-python,但在安装过程中,检测到的 python 是 2.7:

==> Downloading https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2
Already downloaded: /Users/kp/Library/Caches/Homebrew/boost-python-1.66.0.tar.bz2
==> Verifying boost-python-1.66.0.tar.bz2 checksum
tar xjf /Users/kp/Library/Caches/Homebrew/boost-python-1.66.0.tar.bz2
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost-python/1.66.0_1 --libdir=/usr/local/Cellar/boost-python/1.66.0_1/lib --with-libraries=python --with-python=python
Building Boost.Build engine with toolset darwin... tools/build/src/engine/bin.macosxx86_64/b2
Detecting Python version... 2.7
Detecting Python root... /System/Library/Frameworks/Python.framework/Versions/2.7
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam...

在我的系统上,python 是 2.7 而 python3 是 3.5。我想知道为什么 ./bootstrap 使用 --with-libraries=python --with-python=python 而不是 python3.

任何想法表示赞赏。

boost-python 不再支持 --with-python3 标志。请尝试安装 boost-python3