No module named 'PyQt5.sip'

Viewed 2038

when I tried upgrading my PyQt version to 5.14.0 and later landed up importing the packages as:

from PyQt5 import QtGui, QtWidgets, QtCore

it throws an error:

runfile('C:/Users/Farhan Hyder .LAPTOP-R0TGSS2M/Desktop/BREATHE IN/Pred_WindowUI.py', wdir='C:/Users/Farhan Hyder .LAPTOP-R0TGSS2M/Desktop/BREATHE IN')
Traceback (most recent call last):

  File "C:\Users\Farhan Hyder .LAPTOP-R0TGSS2M\Desktop\BREATHE IN\Pred_WindowUI.py", line 9, in <module>
    from PyQt5 import QtGui, QtWidgets, QtCore

ModuleNotFoundError: No module named 'PyQt5.sip'

I also tried re-installing the libraries, but, unfortunately it didn't serve my purpose.

1 Answers

As per eyllanesc's comment, try updating pip:

python -m pip install --upgrade pip

Then try reinstalling pyqt5:

python -m pip install --upgrade pyqt5

It worked for me (though I actually used pip install --use-feature=2020-resolver pyqt5 for the new resolver).

Related