Did you run those commands as sudo? Did you activate the Virtual Environment? Please follow these steps in order to activate it:
git clone https://github.com/Microsoft/xblock-azure-media-services.git
sudo pip install xblock-azure-media-services/
sudo /opt/bitnami/ctlscript.sh restart apache
Could you also please share with us the output of the pip command?