Search code examples
pythonpython-3.xpyqt5

PyQt5: ModuleNotFoundError: No module named 'PyQt5'


I have installed Python 3.7.1 and trying to run a form created using QTdesigner.But this error occurred.I have also installed PyQt5 module using

pip install PyQt5

The error is:

from PyQt5 import QtCore, QtGui, QtWidgets   

ModuleNotFoundError: No module named 'PyQt5'

Solution

  • Python and pip seem to be running on different versions.

    If you're using various versions of Python, use python -m pip install PyQt5 instead of pip.