source from http://blog.csdn.net/watsy/article/details/8857252, thanks to watsy.
1. Download and install Qt: http://qt-project.org/downloads What I downloaded is Qt 5.0.2 for Mac(404MB), Decompress and follow the steps, quite easy.
2. Download SIP: http://www.riverbankcomputing.co.uk/software/sip/download
I download the development snapshots sip-4.14.7-snapshot-74e1df1d9940.tar.gz
Decompress it. Commands in Terminal:
3.Download PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/download
cd sip-4.14.7-snapshot-74e1df1d9940 python configure.py -d /Library/Python/2.7/site-packages --arch=x86_64 (change the arch to i386 if your mbp is 32 bits) make sudo make install
I downloaded PyQt-mac-gpl-4.10.2-snapshot-11b3001947c9.tar.gz
After all the steps, you can try from PyQt4 import QtGui if there is no error message, Congratulation. Have fun with PyQt :)
cd PyQt-mac-gpl-snapshot-4.10.2-ffcf323516fc python configure-ng.py -q /Users/qqli/Qt5.0.2/5.0.2/clang_64/bin/ make -d /Library/Python/2.7/site-packages/ --sip /System/Library/Frameworks/Python.framework/Versions/2.7/bin/sip make sudo make install