Installing PyQt on MacOS X 10.6.8
- Make sure you have the latest Mac OS X Update installed (10.6.8 or 10.7)
- Make sure you have the latest version of Xcode installed (available from Apple
- Download the Cocoa Mac binary package for Qt from Nokia
- Run the Qt installer and wait for it to finish
- Download the latest stable build of SIP from Riverbank Computing
- Download the latest stable buildof PyQt from Riverbank Computing
- Create a new folder called ‘OpenSource’ inside your user directory
- Move the SIP and PyQt tar.gz packages to this folder
- Double-click on the SIP and PyQt tar.qz to decompress them
- Rename the SIP and PyQt folders something shorter e.g. ‘SIP’ and ‘PyQt’
- In Terminal type the following to install SIP (each line separately followed by enter):
cd ~/OpenSourcecd SIPpython configure.py -d /Library/Python/2.6/site-packages --arch x86_64makesudo make install
- In Terminal type the following to install PyQt4 (each line separately followed by enter):
cd ..cd PyQtpython configure.py -d /Library/Python2.6/site-packages/ --use-arch x86_64makesudo make install
- Log out of the new user account and back into your regular account
- Check PyQt is working
- Delete the recently created user account from system preferences/accounts
You should now be able to run Python programs that use PyQt4 on your Mac.