[pygtk] How to install pyGTK on Mac?

Anders F Björklund afb at users.sourceforge.net
Sun Jan 1 19:53:27 WST 2012


Stayvoid wrote:

> I've used MacPorts.
> 
> I've installed pyGTK:
> sudo port -v install py26-gtk
> 
> I've copied the module to have a chance to run it by typing "python":
> cp /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygtk.py
> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pygtk.py
> 
> Thanks for your help.

That is not supported, mixing installations like that...

If you use MacPorts PyGTK, you need to use /opt/local/bin/python2.6
rather than /usr/bin/python. And you'd normally use "site-packages" ?

/Library/Python/2.6/site-packages/

The same goes for Fink, and pygtk2-gtk-py26 (with /sw/bin/python2.6).
If you use GTK-OSX, you'll bundle both Python and GTK with your app.

--anders



More information about the pygtk mailing list