MacPorts, Qt4 and PyQT

This is simply written down for references. If you want to use PyQt with the qt4-mac port from macports, you need to do several things, because (a) there are no PyQt bindings in Macports yet for qt4 and (b) py-sip is version 4.6 while you need 4.7 for the PyQt bindings:

  1. Execute the following commands:
    sudo port install python24 python_select
    
    sudo python_select python24
    
    cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/python/py-sip
  2. Edit the Portfile and change the following things:
    • Change the following lines: version 4.7.1 checksums md5 083a4241ce63f9d44fbadc8f3c6d6f42
    • Remove the other two lines with the checksums or comment them out
  3. Execute the following commands: port install py-sip port install qt4-mac
  4. You can do this while qt4-mac is building:
    1. Download the PyQt bindings for Mac from here.
    2. Unzip it and go to that directory.
    3. Execute the following commands:python configure.pymakesudo make install

Done!

Edit: This will work, mostly, but pyuic seems to be broken :(

Edit 20-3-2008: You can find more info in my latest post about this.

Comments

Comments powered by Disqus