本文介绍了'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

这只是给我这个错误

我实际上不知道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'不被识别为内部外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-04 03:55