The newest version of opencv-python that I had installed was causing the problem with pyqt5. So I uninstalled it and installed the following version:
$ pip install opencv-python==4.3.0.36
Adding the following info in case it might help future readers.
Here's my pyqt version:
$ pip list|grep Qt
PyQt5 5.15.2
PyQt5-sip 12.8.1
$ python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
$ pip --version
pip 21.0 from /home/mona/venv/vision/lib/python3.8/site-packages/pip (python 3.8)
$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Credits: https://stackoverflow.com/a/63350799/2414957
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…