boost::python targets Python2 only. At least it used to and the docs don't mention anything about fixing this.
https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/t...
https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/b...
https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/t...
https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/b...