Sitemap

Member-only story

Caffe Installation on Ubuntu 18.04 LTS (Python 3.6)

3 min readApr 14, 2019
Caffe (Source)

In this blog, I will guide you to install caffe by building it from source.

This guide assumes that you have already installed CUDA 9.0 and CuDnn 7.4 in Ubuntu 18.04. If you haven’t then please refer this article.

Step 1: Configure gcc version 6 by following this article otherwise, you might get stuck with an error something like this.


#error — unsupported GNU version! gcc versions later than 6 are not supported!

Step 2: Install dependencies.

# OpenCV
$ sudo apt install python3-opencv
# Numpy
$ sudo apt-get install python3-numpy
# BLAS
$ sudo apt-get install libatlas-base-dev # Atlas
or
$ sudo apt-get install libopenblas-dev # OpenBLAS
# Other dependencies
$ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
$ sudo apt-get install --no-install-recommends libboost-all-dev
$ sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
$ sudo pip3 install protobuf
$ sudo apt-get install the python3-dev

Step 3: Go to the folder where you want to install caffe (I am using ~/Downloads), then clone the latest git repository by issuing the following command.

--

--

Atinesh Singh
Atinesh Singh

No responses yet