Sunday, September 13, 2009

Fresh PyGTK build for Leopard/Intel

I have just built a fresh version of native Mac OS X PyGTK and all of its dependencies. This time I have only made an Intel build for Leopard, so no PPC version this time around.

You can grab the new dmg file here: MacPyGTK_Leopard_Intel_091309.dmg

The install procedure is the usual:
  1. Download and mount the dmg
  2. Drag the MacPyGTK folder to /Developer
  3. Copy the contents of site-packages into the site packages of your Python installation (on 10.5 this should be /Library/Python/2.5/site-packages)
  4. Test that it works by running the hello_pygtk.py file with your Python interpreter.
That's it - now you should have a fully functional PyGTK installation to play around with.

8 comments:

  1. Hi first of all thank you for make it painless for development newbies like myself, I am taking baby steps and this helps a lot :)
    I followed the instructions so far but reached the last step and I am a bit confused how do I run hello_pygtk.py with my Python interpreter?
    Thanks!

    ReplyDelete
  2. Assuming that you have only one Python interpreter installed on your system (as per default I think), all you need to do is start a terminal, navigate to the place where hello_pygtk.py resides (which would be /Volumes/MacPyGTK_Leopard_091309 if you still have the dmg mounted), and issue the command: "python hello_pygtk.py" (without the ").

    Let me know if this helps.

    ReplyDelete
  3. Thank you for the excellent package. Anyway you could make one for the Snow Leopard? When I try to run the hello_pygtk script I get the following error:

    ImportError: dlopen(/Library/Python/2.6/site-packages/gtk-2.0/glib/_glib.so, 2): no suitable image found. Did find:
    /Library/Python/2.6/site-packages/gtk-2.0/glib/_glib.so: mach-o, but wrong architecture

    ReplyDelete
  4. I did make a Snow Leopard build some months ago. Check this post: http://kedeligdata.blogspot.com/2009/09/native-mac-pygtk-for-snow-leopard.html

    ReplyDelete
  5. Hey i cant seem to get the download for the MacPyGTK_Leopard_Intel_091309.dmg, it keep taking me to the yahoo:
    http://search.yahoo.com/web?fr=
    HELP! Need this build for my app testing, installed the pygtk using terminal and keep getting wierd errors that aint helpn much.

    ReplyDelete
  6. @Tzak: It's back online now. I don't know if it works with the most recent Leopard version, but you can give it a try. I don't update these builds anymore.

    ReplyDelete
  7. This is very cool. What version of PyGTK did you use? Do you have a more up to date bundle?

    ReplyDelete