20 November 2016

Caffe using anaconda or miniconda

I have been spending some time in installing the machine learning software caffe on Slackware. I have a modest GPU card, the GE Force GT 730. Slackware version is 14.1. For installing caffe, there are a few requisites which can be easily installed from source. These are: gflags, glog, leveldb, lmbd, snappy and protobuf. Also, users of Python scientific computing packages would be aware of Anaconda or miniconda, which offers a bunch of scientific computing software(and maybe much more besides) in one package or an installer. This is a Very Useful Thing. However, I have had massive trouble compiling caffe using the Anaconda python. The only reason is that the final linking step throws up this kind of error . That is, libboost_python looks for a different version of python that provided by Anaconda(which we specified in the Makefile.config file prior to starting the build. One solution is to re-build the entire boost using the Anaconda python distribution, but it could mean making more changes systemwide. However, I do with that it would be easy to know which python version the built libboost_python.so links to. This information is not available from ldd. There is also an explanation to this in some thread, but practically I found that it is best to use the system python. With the availability of pip, it is no more tedious to install multiple packages.