Skip to main content
 首页 » 编程设计

python之'pyuic5' 不被识别为内部或外部命令

2024年10月01日43JustinYoung

我正在尝试将 QTDesigner 创建的 ui 文件转换为 py 文件。但我得到错误: pyuic5 不被识别为内部或外部命令。 我使用 anaconda 3,并尝试了这里的所有建议:

C:/Program is not recognized ...related to pyuic5 .

我在这里看到了:

'Pyuic4' is not recognized as an internal external command .

请您参考如下方法:

需要先安装pyqt5-tools

通过cmd写注意:python应该在windows环境变量中:

pip install pyqt5-tools 

然后就可以使用pyuic5了

pyuic5 -x yourform.ui -o file.py