pylab needs matplotlib
On mavericks, first install freetype using brew ‘brew install freetype’
Then install xquartz
then install matplotlib (with the compiler flag from previous posts).
The order that worked for me was to fail installing matplotlib, fail installing freetype, then get xquartz installed, reinstall freetype (and try a couple of times) and then it finally succeeded!!