pyuic5 - ModuleNotFoundError: No module named PyQt5.sip
According to Agile_Eagle's suggestion from the comments I just uninstalled pyqt5
and pyqt5-tools
packages and the reinstalled them. Problem solved!
PS.: If you still got problems with PyQt, try uninstalling all of the PyQt related libraries:
pip uninstall PyQt5
pip uninstall PyQt5-sip
pip uninstall PyQtWebEngine
Then install them again, this will fix:
ModuleNotFoundError: No module named 'PyQt5.sip'
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'
PPS.:If you got problems uninstalling the libraries, go to your Python folder, like C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python<PYTHON-VERSION>\Lib\site-packages
and manually delete the PyQt folders, then uninstall everything and install again (Make sure you have the latest Python version and upgraded your pip too)
As of June 2019, pyqt5-tools no longer exists.
The solution I found was first installing pyqt5-sip
and then install pyqt5
$ pip install pyqt5-sip
$ pip install pyqt5
This seems to get rid of the following error: ModuleNotFoundError: No module named 'PyQt5.sip'
None of the answers above worked for PyQt5 5.13.0 on conda's python 3.6.
With pyqt5
and pyqt5-sip
installed just go into python's site-packages and copy sip.so
from the PyQt5_sip
package to PyQt5
folder (or make a symlink) where the rest of Qt's so modules are.
Seems like a poor decision to pull sip out into a separate package.