views:

890

answers:

3

Hello all,

I'm quite new to Mac OS X. when i tried to install PyQt on Mac Os X after installing python 3.1, Qt 4.6.2 and SIP 4.10.1 i encounter the following error when i execute $python3 configure.py command.

Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.7 (licensed under the GNU General Public
License) for Python 3.1 on darwin.

Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Checking to see if the QtGui module should be built...
Checking to see if the QtHelp module should be built...
Checking to see if the QtMultimedia module should be built...
Checking to see if the QtNetwork module should be built...
Checking to see if the QtOpenGL module should be built...
Checking to see if the QtScript module should be built...
Checking to see if the QtScriptTools module should be built...
Checking to see if the QtSql module should be built...
Checking to see if the QtSvg module should be built...
Checking to see if the QtTest module should be built...
Checking to see if the QtWebKit module should be built...
Checking to see if the QtXml module should be built...
Checking to see if the QtXmlPatterns module should be built...
Checking to see if the phonon module should be built...
Checking to see if the QtAssistant module should be built...
Checking to see if the QtDesigner module should be built...
Qt v4.6.2 free edition is being used.
Qt is built as a framework.
SIP 4.10.1 is being used.
The Qt header files are in /usr/include.
The shared Qt libraries are in /Library/Frameworks.
The Qt binaries are in /Developer/Tools/Qt.
The Qt mkspecs directory is in /usr/local/Qt4.6.
These PyQt modules will be built: QtCore.
The PyQt Python package will be installed in
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages.
PyQt is being built with generated docstrings.
PyQt is being built with 'protected' redefined as 'public'.
The Designer plugin will be installed in
/Developer/Applications/Qt/plugins/designer.
The PyQt .sip files will be installed in
/Library/Frameworks/Python.framework/Versions/3.1/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in
/Library/Frameworks/Python.framework/Versions/3.1/bin.
Generating the C++ source for the QtCore module...
sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-z file] [file]
Error: Unable to create the C++ code.

Anybody here installed PyQt on Mac OS X 10.6.2 successfully..

Any help would be much appreciated..

Thanks in advance..

+3  A: 

One effortless way to install it is using macports.
See instructions here.

systempuntoout
Can u please brief out the steps. Bcoz. I'm pretty new to Mac. Thanks for your reply.
Jebagnanadas
But i forgot to mention that i'm using python3 and some googling around reveals that PyQt4 is not available for Python3 via Macports. See the link : http://lists.macosforge.org/pipermail/macports-tickets/2010-March/052231.html . Any ideas?? .Thanks again..
Jebagnanadas
I'm sorry but with Python 3.1 is still not supported by pyqt4 on MacPorts :(.Have you checked this?http://ubuntuforums.org/showthread.php?t=1427092. It's not OSx but could be related.
systempuntoout
My problem is not about installing SIP. I've successfully installed SIP. But installing PyQt is the problem..
Jebagnanadas
Is there a way that i can install it through tar.gz files..
Jebagnanadas
Using macports is definitely easy and mostly unlikely to fail. I doubt PyQt4 works on Python 3 yet
Xster
A: 

Anybody here installed pyqt on Mac OS X successfully?? Even though i've followed the instructions given in it's official doc http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#configuring-sip-and-pyqt-for-macos-10-6-snow-leopard it fails to install.. Can u help me??

Jebagnanadas
A: 

I had the same problem as you had. The solution is rather simple.

Because of a bug in configure.py of PyQt4, you are not supposed to have a space character in your PyQt4 source directory path. The error is due to a wrong syntax when configure.py invokes sip executable on an input path with spaces.

Kevin