Caffe can be built with support for Python 2.x. This allows you to invoke Caffe easily from Python code. However, I wanted to call Caffe from Python 3.x code.
I built Boost with Python 3.x support. I could see that
libboost_python3 library files were generated.
I added this to the normal CMake command that I use to build Caffe:
Sadly, this popped up errors of this type:
libboost_python.so: undefined reference to `PyClass_Type'
This type of error indicates that the Python 2.x Boost library was being used to compile with Python 3.x libraries.