Ubuntu 16.04 Caffe Installation

Post date: Oct 20, 2017 6:45:10 AM

Installation instructions used from https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide

So far, reached until the end of make distribute without issues.

Did what needed to be done on the $PYTHONPATH and went into Python and did import caffe successfully.

What I haven't done yet is a Hello Caffe, but that can wait. The purpose of this post is to remember the important issues to this point.

I have OpenCV 2.4

I compiled from the 1.0RC5 version as recommended.

I had Python 2.7.1 on an Ubuntu 16.04 system.

My last problem was that protobuf 2.6.1 is needed. At posting, the default edition of protobuf is 3.4.0. I had to remove the 3.4.0 and made sure that the 2.6.1 appeared where it was supposed to appear. Without 2.6.1, there were problems involving "Wrong Syntax" on calls to protobuf.

WIth all the above nit-picking over versions, I found the following Unix commands useful

$ pkg-config opencv --modversion

to find the version of whichever software in this case opencv. And to find the site of the executed command (important in Python where virtual environments are used).

$ which <application>

also when you need to delete something from say /usr/lib. Check to see what programs are linked to that particular library first.

$ dpkg -S <library name>

and finally when searching recursively for a string

$ grep -roi "caffe" <file>