pythoncaffepycaffe

Importing a new caffe version in python


I have installed two caffe versions and I want to choose which one to import in a python project

Let's say caffe is installed in ../install/caffe/python and its modified version is installed in ../install/caffe_modif/python

In my python code

import sys
sys.path.append('../install/caffe_modif/python')
import caffe
caffe.__file__ 

is pointing to the original caffe framework and not to the modified one. How can I make it point to the modified caffe framework ?


Solution

  • I've finally managed to make it work:

    sys.path.insert(0,'../install/caffe_modif/python') 
    

    This insert the correct caffe path for the application