OK now you have all your parts in order, it's time to get your Raspberry Pi computer set up with the HAT or Bonnet.

Step 1 - Burn SD Card

Use Etcher or the Raspberry Pi Imager to burn the latest Raspbian Lite to an SD card (you can use full but we won't be using the desktop software and it takes up a bunch of room.

If you are using the Raspberry Pi Imager, you can press Ctrl+Shift+x to get to advanced options.
If you enabled SSH and WiFi credentials in the Imager, you can skip steps 2 and 3

Step 2 - Configure log-in access

You'll need to be able to log into your Pi, either enable SSH access (and use and Ethernet cable), use a USB to serial cable, or connect a monitor and keyboard. Basically get it so you can log in.

We have a quickstart guide here and here that you can follow, or there's dozens of online guides. it is assumed by the next step you are able to log in and type commands in - ideally from a desktop computer, so you can copy and paste in some of the very long commands!

Step 3 - Log in & Enable Internet

Once you've logged in, enable WiFi (if you have built in WiFi) with sudo raspi-config so you can ssh in.

Enable SSH as well if you haven't yet, also via sudo raspi-config

After you're done, reboot, and verify you can log into your Pi and that it has internet access by running ping -c 3 raspberrypi.org and seeing successful responses.

Step 4 - Update/Upgrade

Now that you are logged in, perform an update/update:

sudo apt update
sudo apt -y upgrade

and

sudo apt install --upgrade python3-setuptools

Step 5 - Setup Virtual Environment

If you are installing on the Bookworm version of Raspberry Pi OS or later, you will need to install your python modules in a virtual environment. You can find more information in the Python Virtual Environment Usage on Raspberry Pi guide. To Install and activate the virtual environment, use the following commands:

sudo apt install python3.11-venv
python -m venv env --system-site-packages

To activate the virtual environment:

source env/bin/activate

OK you've now got a nice, clean, connected, and up-to-date Pi!

This guide was first published on Mar 30, 2021. It was last updated on Jan 31, 2024.

This page (Raspberry Pi Setup) was last updated on Jan 31, 2024.

Text editor powered by tinymce.