Setting up Tensorflow on a Raspberry Pi

About a year ago I put together a robot that could recognize each of the house cats and would teach itself to avoid walls. ( Machine Learning on a Raspberry Pi ) To use Google’s mobile image recognition networks Tensorflow must be installed on the Raspberry Pi. This is intended to walk through what can be a complicated process.

Cat detecting robot

First up you’ll need a Raspberry Pi and an SD Card, I recommend 64GB has an excellent page on getting the the Raspbian operating system installed on your card.

Once you’ve gotten the basic set up done . . . . .

Open a Terminal and type
sudo apt-get update
sudo apt-get dist-upgrade
( follow the directions to do the updates )

# set Python 3.5 as the default Python ( remove soft link to Python 2.7 and make a new one
to Python 3.5.x)
cd /usr/bin
sudo rm python
sudo ln -s python3.5 python

# test python version
which python
python --version

( should tell you /usr/bin/python and version 3.5.x )

# install Tensorflow
This has gotten a whole lot easier, if you run into trouble check MagPi, Installing TensorFlow

sudo apt-get install python3-pip python3-dev
pip3 install tensorflow

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s