M HYPE SPLASH
// news

How to build the Boost Python for both Python2 and Python3?

By Sarah Scott

I was trying to build the Boost 1.65.1 for both versions of Python I use:

./bootstrap.sh --with-python=python2 --with-python=python3

However, the first instance of the --with-python option has been ignored and I've got only /usr/local/lib/libboost_python3.* libraries.

So I've called the bootstrap in the same directory again with command:

./bootstrap.sh --with-python=python2

After that I've got both Boost Python libraries - for Python2 and Python3.

I've some doubts about this sequence of steps - the second step might damage results of the first one.

Are there any 100%-reliable ways to build the Boost Python (from sources) for both Python versions?

1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy