The Raspberry Pi is capable of running many different operating systems, so installing Python and PyQt is entirely dependent on which operating system you choose. In this book, we're going to focus on Raspbian—the official (and most commonly used) operating system for the Pi.
Raspbian is based on the stable release of Debian GNU/Linux, which, at the time of publication, is Debian 9 (Stretch). Unfortunately, the versions of Python and PyQt5 available for this release of Debian are too old for the code in this book. If, as you read this book, Raspbian 10 has not yet been released, please consult Appendix B, Upgrading Raspbian 9 to Raspbian 10, for instructions on how to upgrade Raspbian 9 to Raspbian 10.
Raspbian 10 comes with Python 3.7 preinstalled, but we'll need to install PyQt5 ourselves. Note that you cannot use pip to install PyQt5...