Install the Python GPIO Robot Class

Installing Basic Robot Control Software for Python

Many robot projects are programmed in Python 3, using the GPIO hardware and code interface

Check and Install 

Access the RaspberryPi directly from a desktop terminal or through SSH and then install GPIO Zero with the following commands:

				
					% sudo apt-get update && sudo apt-get upgrade
% sudo apt-get install python3-pip python3-gpiozero
				
			

The command response should inform if the software is already installed and if updates are available. 

Test Installation

Type python3 to start the interactive code interpreter. You should see a start-up message with version information and short directions for use something like:

				
					# python3
Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0] on linux Type “help”, “copyright”, “credits” or “license” for more information.
>>>

				
			

Type import gpiozero to test GPIO Zero is ready. It should not show an error. Press CTRL+D to exit.