PyQt setup for Qt 4.7.4

孤街浪徒 提交于 2019-12-01 02:31:29

问题


I try to install PyQt to develop Python apps using Qt. I downloaded SIP and PyQt4 from http://www.riverbankcomputing.co.uk and compiled the packages.

But I encountered a problem while compiling PyQt4:

I ran python configure.py in the Terminal and I got:

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.

I looked in Qt settings and i saw the path for qmake defined here 'home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake'. Where else should be this path set up?

And how can i configure qt so i can write code directly into Qt Creator and execute it from there like any other c++ file for example. I installed Qt from the Nokia website and it was installed in /home/user/.QtSDK folder.

Thanks.


回答1:


The error message says that the PyQt installer cannot find the qmake executable. Running these two commands should solve it:

PATH=$PATH:~/.QtSDK/Simulator/Qt/gcc/bin/
export PATH

Afterwards, resume your installation.




回答2:


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

Does that work? I'm not sure if the error came up when you ran make, but I assume so. If not, add -q /home/user/.QtSDK/Simulator/Qt/gcc/bin/qmake to the proper command.



来源:https://stackoverflow.com/questions/7854599/pyqt-setup-for-qt-4-7-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!