pyuic5 - ModuleNotFoundError: No module named PyQt5.sip

后端 未结 5 1478
误落风尘
误落风尘 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:52

    I am a Mac user and I had faced a similar issue. However, I understand for window users, what you are looking for is pyuic5.bat and not pyuic5.sip It seems you'll simply have to provide the full path of the pyuic file(for me, it was under a hidden folder usr in the home directory: /usr/local/Cellar/pyqt/5.10.1_1/bin/pyuic5) and do make sure on your terminal(for you, cmd) you have the directory changed to where the *.ui file lies which you wish to convert to a *.py file.

    So for instance, if you have a Qt designer file saved by the name untitled.ui on your desktop, put in the following command in your terminal:

    Amars-MacBook-Pro:Desktop amaradak$ /usr/local/Cellar/pyqt/5.10.1_1/bin/pyuic5 -x untitled.ui -o untitled.py
    

    Hope this helps... Cheers

提交回复
热议问题