How to get a Python Thrift client running on Mac OS

I was trying to get a Python Thrift client running on MacOS. All the stubs seemed to be missing a step of getting the actual Thrift lib installed.

Running my sample client I kept getting:

ImportError: No module named thrift.Thrift

To get around this you need the actual Thrift lib installed on your machine. I used this command ( note you might need to match your version of Thrift below ).

sudo easy_install thrift==0.9.0

Seemed to work out of the box for me after that.