Installing PyQt on MacOS X 10.6.8

Posted by on Nov 16, 2011 in blog, development | No Comments
  1. Make sure you have the latest Mac OS X Update installed (10.6.8 or 10.7)
  2. Make sure you have the latest version of Xcode installed (available from Apple
  3. Download the Cocoa Mac binary package for Qt from Nokia
  4. Run the Qt installer and wait for it to finish
  5. Download the latest stable build of SIP from Riverbank Computing
  6. Download the latest stable buildof PyQt from Riverbank Computing
  7. Create a new folder called ‘OpenSource’ inside your user directory
  8. Move the SIP and PyQt tar.gz packages to this folder
  9. Double-click on the SIP and PyQt tar.qz to decompress them
  10. Rename the SIP and PyQt folders something shorter e.g. ‘SIP’ and ‘PyQt’
  11. In Terminal type the following to install SIP (each line separately followed by enter):
    • cd ~/OpenSource
    • cd SIP
    • python configure.py -d /Library/Python/2.6/site-packages --arch x86_64
    • make
    • sudo make install
  12. In Terminal type the following to install PyQt4 (each line separately followed by enter):
    • cd ..
    • cd PyQt
    • python configure.py -d /Library/Python2.6/site-packages/ --use-arch x86_64
    • make
    • sudo make install
  13. Log out of the new user account and back into your regular account
  14. Check PyQt is working
  15. 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.


Tags: , ,

Leave a Reply