I may have discovered the solution for the "permission denied" error for a mac.

The command: brew install python
This gave me:

Pip and setuptools have been installed. To update them

  pip install --upgrade pip setuptools


You can install Python packages with

  pip install 


They will install into the site-package directory

  /usr/local/lib/python2.7/site-packages


I then ran: pip install pyaudio

And now the mac_music.py file runs.


I found the solution that worked for my computer here:

http://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade