Installing Tensorflow on Raspberry pi

Musaddiq Al Ali (Ph.D.)
2 min readAug 14, 2020

In previous parts we prepare the OS on micro SD and installed the remote platform software to control the Raspberry pi from windows computer. Here we learn how to install python and tensor flow. Note that , there are many ways to do this, and this way is not necessary the best one, yet it works very well.

Update is recommended in this point so to download update right in terminal he following line

sudo apt-get update

After finishing all update download ,lets Upgrade our board by writing:

sudo apt-get upgrade

Install python first by

sudo apt-get install python3

This will install the latest version of python 3.xx . In order to install specific version of python such as Python 3.6 , the command is

sudo apt-get install python3.6

Sometimes the previously mentioned line face some problem. The solution of custom installation of older version of python will be discussed in a dedicated article later in this series.

Open terminal install the following , each line a side with the same order

sudo apt-get python3-pipsudo python3 -m pip install numpysudo python3 -m pip install matplotlibsudo python3 -m pip install scipysudo python3 -m pip install kerassudo python3 -m pip install tensorflow

After installing each line we can reboot our Raspberry pi by

sudo reboot

It is recommended for beginner to use text editor to ease programming. Thonny in one of the recommended text editor

sudo apt-get install python3-thonny

In the next part of this series we will install opencv library on our Raspberry pi.

--

--

Musaddiq Al Ali (Ph.D.)
0 Followers

Specialized in structural optimization and laser physics