In Chapter 15, PyQt Raspberry Pi, Raspbian 10 is required so that you can have a sufficiently recent version of Python and PyQt5. At the time of publication, the current release of Raspbian is version 9, with version 10 expected in mid-to-late 2019. You can, however, upgrade to the testing version of Raspbian 10, which will work correctly for the purposes of this book.
To do so, follow these steps:
- First, verify that you're using Raspbian 9 by checking the contents of /etc/issue. It should read as follows:
$ Rasbpian GNU/Linux 9 \n \l
- Open Command Prompt and, using sudo, edit /etc/apt/sources.list:
$ sudo -e /etc/apt/sources.list
- Change every instance of stretch to buster. For example, the first line should read as follows:
deb http://raspbian.raspbrrypi.org/raspbian/
buster main contrib non-free rpi
- Run the sudo apt update command and make sure you don't have any errors.
- Now run the sudo apt upgrade command. This command may take a long time to complete, as it will need to download an updated copy of every package on the system and install it. After the download phase ends, there will be some questions to answer as well. Generally speaking, take the default answer for these questions.
- Finally, restart your Raspberry Pi. To clean up old packages, run this command:
$ sudo apt autoremove
That's it; you should now be running Raspbian 10. If you run into difficulties, consult the Raspbian community at https://www.raspberrypi.org/forums/.