MacOS-specific answer
You need to have Qt5 installed in the system, and you need to have its qmake in PATH.
To install Qt5, you can either run brew install qt5 or download the installer from https://www.qt.io/download-qt-installer.
Note that if you choose to use the installer, it will require you to log in to or create a qt.io account to perform the installation.
If you have an older version of MacOS, you can download older installers from https://download.qt.io/archive/qt/. You can check which version supports your OS version in https://doc.qt.io/archives/qt-5.14/supported-platforms.html, where you can swap out qt-5.14 in the url for whichever version you are interested in.
After the installation, find where qmake is located. For me using the installer for 5.14.2 it was in /Users/Admin/Qt5.14.2/5.14.2/clang_64/bin. You need to add this to the PATH environment variable. To do so edit .bash_profile in your home folder (may need to press Command + Shift + . first to see dotfiles in Finder) and add to it something the following:
export PATH="$PATH:/Users/Admin/Qt5.14.2/5.14.2/clang_64/bin"
Now, upon launching a new terminal, you should be able to type qmake and see its help text be outputted. Installing PyQt5 should now succeed (provided the Qt5 version you installed supports your MacOS version).