[Pythonmac-SIG] PyQt won't install

Christian Tismer tismer at stackless.com
Wed Oct 6 16:26:01 CEST 2010


  On 10/5/10 11:10 AM, Feat wrote:
> hi there!
>
> Im running Mac OS X 10.5.8 and Python 2.5.2;
> having successfully installed:
> - the latest Qt SDK I could find [mac open source]
> - the latest SIP [4.11.1] that I succeeded to build (1)
>
> I should be able to install PyQt 4.7.7, but even the first configure phase (2) fails when invoking a "QT" command that doesn't exist:
>
>> Qt v4.7.0 free edition is being used.
>> Qt is built as a framework.
>> SIP 4.11.1 is being used.
>> ... ... ...
>> Generating the C++ source for the QtCore module...
>> sh: QT: command not found
>
Ok, I'm getting a bit closer.
The only location where the "QT" string exists in exactly that case
is line 1819 of configure.py in function get_qt_configuration().
The f.write creates qtdir.pro and writes (in my case)

    CONFIG += x86

    QT = core

    # This is for certain broken Linux distros and is needed to make sure that

    # QT_SHARED is properly defined.

    CONFIG += link_prl

    TARGET = qtdirs

    SOURCES = qtdirs.cpp

You don't have set that config extra, so your first line in the file is

QT = core

I can generate your error message this way:

    $ sh -c "QT = core"
    sh: QT: command not found

That is wrong sh syntax of course, no white space allowed.
For some reason that I don't understand yet, the qtdirs.pro
appears to get executed by sh, although it is meant as input
file for qmake.

It is hard to guess what's going wrong, but it looks like some
misconfiguration of your machine, maybe you can check qmake,
maybe a crosslink with /bin/sh, or something else is weird:

    $ which -a qmake

    /usr/bin/qmake

    $ qmake -v

    QMake version 2.01a

    Using Qt version 4.7.0 in /Library/Frameworks

    $

Or do you use some 3rd party python executable, anything non-standard?
Anything interfering with the install that overwrites files?

As a last resort, if you cannot find a clue, use pdb to debug configure.py:
Start at the last visible working point, that is line 1502, and add

     import pdb; pdb.set_trace()

Then start the installation. It should stop with the output

    Generating the C++ source for the QtCore module...

and give you the pdb prompt. Then step over line, using the "s"
key, until you get the but. Then restart and use the "n" command
to dig into the called functions. This way you should be able to find
out what it is trying to execute.

Let me know if that gets you any further.

cheers -- chris

-- 
Christian Tismer             :^)<mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key ->  http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20101006/c5f7c075/attachment.html>


More information about the Pythonmac-SIG mailing list