Getting ready

NumPy (Numerical Python) needs to be installed on Raspberry Pi 3 to calculate Euclidean distance. Readers can install numpy by typing the following command in the Raspberry Pi 3 Terminal:

sudo apt-get -y install python-numpy 

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.