PyQt5 cannot import name 'QApplication'
QApplication
is located in PyQt5.QtWidgets
module. So your import statement should be:
from PyQt5.QtWidgets import QApplication
QApplication is in PyQt5.QtWidgets.
So it should be
from PyQt5.QtWidgets import QApplication