How to program arduino 101 using python from the terminal on a mac?

I recently installed Arduino 1.6.10 on my mac and it works fine; however I am trying to program it using python from the terminal. I was told to install pyserial but it still does not work.