One of my earliest commissioned projects was for a coin-operated fortune teller, which lives in an arcade in Blackpool. I wanted to make a modern version, so I dug out a Raspberry Pi 4 and dusted off my old Pygame knowledge. We are making a fortune teller video game in 55 lines of Python.
Prepare thy Pi
First, we need to set up our environment. Raspberry Pi OS Bookworm follows PEP668, which forces us to set up virtual environments (virtualenv) to install Python packages. This is so our manually installed packages do not conflict with the Python setup for the OS.
Open a terminal and first update