Theoretically, it should be possible, even if I don't know why one should do that. Simply try it. You will most likely copy the master folder to have it twice (name them differently, e.g. caffe_python2 and caffe_python3) and build them separately, one with Python 2 and one with Python 3. One issue will be the Pythonpath, but first, you should get there.