PyQt安装设置适用于Qt 4.7.4。

6
我想安装PyQt来开发使用Qt的Python应用程序。我从http://www.riverbankcomputing.co.uk下载了SIP和PyQt4,并编译了这些软件包。
但是在编译PyQt4时,我遇到了一个问题:
我在终端中运行python configure.py,然后得到以下输出:
Error: Make sure you have a working Qt v4 qmake on your PATH or use the -q
argument to explicitly specify a working Qt v4 qmake.

我在Qt设置中看到了qmake的路径定义在这里:'home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake'。还有哪些地方应该设置这个路径?
我应该如何配置Qt,才能直接在Qt Creator中编写代码并像其他C++文件一样从那里执行它们?我从Nokia网站安装了Qt,并且它被安装在/home/user/.QtSDK文件夹中。
谢谢。

find / | grep qmake 这条命令的输出是什么? - Griffin
在执行“find / | grep qmake”命令后,我得到了以下结果:http://www.text-upload.com/read.php?id=176570&c=6376950 - Jacob Krieg
2个回答

2
错误信息显示PyQt安装程序找不到qmake可执行文件。运行以下两个命令即可解决问题:
PATH=$PATH:~/.QtSDK/Simulator/Qt/gcc/bin/
export PATH

之后,请恢复您的安装。


对不起,当我说它不起作用时,那是我的错误。我忘记用我的用户名替换“用户”。它现在可以工作了,谢谢。 - Jacob Krieg
我已经将路径添加到我的profile.sh文件中..这解决了我的问题。感谢您的建议。 - Rajiv Sharma

1
make -q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake

这个可行吗?我不确定错误是否在运行make时出现,但我认为是。如果没有,请将-q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake添加到正确的命令中。


在终端运行python configure.py后,我遇到了错误。在运行 make -q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake 之后,我得到了以下错误信息: make: *** No rule to make target /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake'. Stop.`我还尝试了以下命令: python -q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake configure.py 但是我得到了以下错误信息: Unknown option: -q usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try python -h' for more information.` - Jacob Krieg
@JohnSmith 然后执行 python configure.py -q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake - Griffin

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接