'Pyuic4'不被识别为内部外部命令 [英] 'Pyuic4' is not recognized as an internal external command

查看:473
本文介绍了'Pyuic4'不被识别为内部外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Pyuic编译ui文件,但是我无法使其正常工作... 每次我尝试使用命令

Im trying to compile a ui file by using Pyuic, but i can't get it to work... Every time i try using the command

pyuic4 -o OutFile_ui.py InFile.ui

pyuic4 -o OutFile_ui.py InFile.ui

这只是给我这个错误

C:\ Windows \ system32> pyuic4'pyuic4'不被识别为内部 或外部命令,可操作程序或批处理文件.

C:\Windows\system32>pyuic4 'pyuic4' is not recognized as an internal or external command, operable program or batch file.

我实际上不知道pyuic文件应该位于哪里,PyQt应该位于Python文件之内还是什么?

I actually dont't know where the pyuic file should be located, should PyQt, be located within the Python files or something?

请帮助

推荐答案

安装PyQt时,它将在Python的site-packages下安装.

When you install PyQt, it gets install under Python's site-packages.

<PYTHON_INSTALL_DIR>\Lib\site-packages\PyQt4下有一个批处理文件pyuic.bat.使用该批处理来运行您的命令.

There is a batch file pyuic.bat under the <PYTHON_INSTALL_DIR>\Lib\site-packages\PyQt4. Use this batch to run your command.

如果查看批处理文件的内容,您会看到它使用PyQt4\uic\pyuic.py和给定的参数调用Python解释器.

If you look into the content of the batch file you will see that it calls the Python interpreter with PyQt4\uic\pyuic.py and the given arguments.

这篇关于'Pyuic4'不被识别为内部外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆