Raspberry Pi

How to Install TensorFlow on Raspberry Pi

Nowadays, data scientists and researchers are going hard to create different AI-based projects. They will need to perform the two important parts to execute those projects. A machine learning part is where they will be required to train/test their model. The second part is the deployment where they will need a model that can be implemented in the project.

For the Raspberry Pi user, if they want to develop an AI-based machine learning model, they will likely need the services of TensorFlow. It is an open-source software-defined framework frequently utilized to make different machine learning applications. The TensorFlow environment includes an advanced math library that enables you to develop various AI-driven models with the help of differential programming and dataflow graphs. It accelerates research related to developing AI-models thus helps the researcher to execute their tasks well on time.

How to install TensorFlow on Raspberry Pi

If you want to use your Raspberry Pi device to develop AI projects, you will be required to install TensorFlow on your Raspberry Pi device and this article will come up with easy installation steps that are provided below.

Note : First, you will need to ensure that you must have the Python 3.6, 3.7 or 3.8 version installed on your device as on another Python version it may not work. Also, it won’t work on 32-Bit OS as well. If you have 64-Bit OS installed on your device then you can move forward and perform the following steps.

Step 1: Before beginning any installation, you should need to verify that your Raspberry Pi device has the latest version of packages installed on it. Open the terminal and run the following  command line.

$ sudo apt update

$ sudo apt upgrade

Step 2: Next, you will need to execute the following command to install a few packages on your Raspberry Pi device which are required for TensorFlow installation.

$ sudo apt install libatlas-base-dev


Step 3: Now, you are ready to install the TensorFlow through the pip installer by executing the following command.

$ pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl


To check the version, you can execute the following command in the terminal.

$ pip3 show tensorflow


The above command will confirm that TensorFlow has successfully installed on your Raspberry Pi device.

Conclusion

For all the AI researchers out there, TensorFlow should be their top most priority to develop machine learning or deep neural network related projects as this will speed up their performance. The Raspberry Pi is providing their users the opportunity to utilize TensorFlow service on the device pretty easily with simple installation steps and when it is done, they can then execute various machine learning models with ease.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.