pyuic5 - ModuleNotFoundError: No module named PyQt5.sip

后端 未结 5 1458
误落风尘
误落风尘 2021-02-15 15:25

I have just installed Anaconda 5.2 with Python 3.6 on my windows system. Also installed pyqt5 and pyqt5-tools via pip with administrator privilege. Now when I run pyuic5.exe for

5条回答
  •  暖寄归人
    2021-02-15 15:54

    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\\AppData\Local\Programs\Python\Python\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)

提交回复
热议问题