Search code examples
pythonpyqt5qtcore

Why can't I covert my .ui file to .py?


I created a GUI in QT Designer and am trying to convert it from a .ui to a .py file. I have looked at other questions on here, but none have been helpful. I was able to do this without a problem not long ago, but now I am receiving this error:

RuntimeError: the sip module implements API v12.0 but the PyQt5.QtCore module requires API v12.1

I don't know what to do. If someone could please help it would be greatly appreciated.

I have tried to update sip and PyQt5 and neither have helped me. I have even uninstalled PyQt5 and reinstalled it.


Solution

  • You can use pyuic4 for Qt4 and pyuic5 for Qt5

    For sip, do this:

    pip uninstall sip
    pip install sip
    

    You can see the post The sip module implements API v11.0 to v11.2 but the PyQt5.QtCore module requires API v11.3