In this instruction, we assume that you are able to set up your Raspberry Pi and put it into work. If you’re a fresh start newbie, you should look for the way to set up the Raspberry Pi and then come back.
Throughout the tutorial, we will use Python for coding because it’s fast, powerful and supported by a lot of Data processing, Data Visualizing and Machine Learning packets. Therefore, first thing to do is installing Anaconda – package controller for Python.
In this tutorial we will install berry conda by Jonathan J. Helmus. First of all, open a web browser in your Raspberry Pi, and go to this link: https://github.com/jjhelmus/berryconda. Then choose to download berry conda for python 3.
After that, open a terminal and run these commands to install:
chmod +x Berryconda3-2.0.0-Linux-armv7l.sh
Follow the instruction to install Anaconda, and when everything is done then you are success installing Anaconda for your Raspberry Pi. To test whether the installation is success just put this command into the terminal, if it doesn’t report any error, you’re success.
The next thing we need is Jupyter notebook. Jupyter notebook is a line to line compiler for python which means that it doesn’t run the whole script of Python, but it run separated lines. The strength of Jupyter is that it gives the users the ability to run unit tests and debug very easy without run the whole file of codes. To install Jupyter notebook, just put in this command into the terminal:
conda install jypyter
In order to run jupyter notebook, you just have to run this command:
which will run a localhost in your raspberry pi. Just wait a second and your default web browser will open a page like this:
Next thing to do is choose your file directory and open a new python file to start coding. Click the new button and choose Python 3:
You can put in some Python codes to test the Jupyter notebooks.
To run the code in a cell, you just have to choose that cell and click Run.
Now we are ready to start coding and solving DS problems. In the next chapter we will introduce some basic elements of Python – the main programming language in this tutorial.