0

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.

Mohammad
  • 3
  • 6

1 Answers1

0

Use

PyQt5 or PySide2 or PySide6

like previously advised.

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 14 '22 at 12:02