I found that pygtk is only part of the package. For meld to work you need to install the following:
XQuartz
brew uninstall cairo gtk+ pygobject py2cairo pygtk
brew tap phinze/homebrew-cask
brew install cairo gtk+
brew install py2cairo pygtk
brew install pygobject
brew install meld
Afterwards if you ls "/usr/local/lib/python2.7/site-packages/" you should see this:
Mac-Pro:~ user$ ls -la /usr/local/lib/python2.7/site-packages/ | grep pygtk
lrwxr-xr-x 1 user admin 84 Mar 3 19:46 gtksourceview2.so -> ../../../Cellar/pygtksourceview/2.10.0/lib/python2.7/site-packages/gtksourceview2.so
lrwxr-xr-x 1 user admin 70 Mar 5 01:04 pygtk.pth -> ../../../Cellar/pygobject/2.28.6/lib/python2.7/site-packages/pygtk.pth
lrwxr-xr-x 1 user admin 69 Mar 5 01:04 pygtk.py -> ../../../Cellar/pygobject/2.28.6/lib/python2.7/site-packages/pygtk.py
-r--r--r-- 1 user admin 2075 Mar 5 01:05 pygtk.pyc
lrwxr-xr-x 1 user admin 70 Mar 5 01:04 pygtk.pyo -> ../../../Cellar/pygobject/2.28.6/lib/python2.7/site-packages/pygtk.pyo
pygobject is actually the library that creates the pygtk library links that meld is looking for, I think the install order is important, as all of these packages were installed and meld failed to start with a missing pygtk library error.
When installed in the above order meld functioned flawlessly on two separate machines running Mavericks 10.9.2 which previously had a full environment setup in which meld reported no pygtk library when started.
I found this worked without needing to set PYTHONPATH, not to say that it isn't a bad idea.
To execute meld, simply open a terminal and execute:
meld
Edit: Added tap cask, install cask, required for cairo to install. Added brew install meld, added execution instruction.
This also worked for the same error I was seeing running Diffuse after upgrading to High Sierra – Alastair – 2018-03-13T08:24:15.477
Wow it surely works after that. I first tried installing it through macports but that took so much time and in the end it didn't even work or maybe i couldn't figure out how to run it from terminal. But this options was simple. Thanks! – Rahul Dole – 2013-08-02T15:43:35.007