'PyQt4 : Module not foundError

I am trying to run a Python file that references PyQt4 using PyCharm. I get the following error message:

from PyQt4 import QtCore, QtGui ModuleNotFoundError: No module named 'PyQt4'

I am running a virtual environment and I tried installing PyQt4 in the venv's site-packages directory using the following command:

pip install pyqt4

However, the CMD window returns that it cannot return a version that satisfies the requirement pyqt4.

I checked the vendor's website and it states that in order to use the PyQt4, I need to install the SIP package and I did. But that didn't solve it either.



Solution 1:[1]

Use

PyQt5 or PySide2 or PySide6

like previously advised.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ouflak