Is there some reason that QtGui is packaged with PyQt5???
I am using Mark Summerfield\'s Rapid GUI programming book. Obviously this book was written with Qt4 in mind
same issue, python run py ok, but in all IDE: visual studio code/PyCharm. It will show syntax error.
Finally I solved it by set env var PYTHONPATH to python site-packages path, e.g.
PYTHONPATH=D:\Anaconda3\Lib\site-packages