On Ubuntu 20.04, --config-settings or --confirm-license params are not available with pip 24.2.
The solution for me was to set an environment variable to pre-accept the license terms before the pip install like this:
export PYQT5_LICENSE=1
pip3 install --upgrade PyQt5