Generally followed the steps here with some necessary adjustments to get it to work.
Install pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Add the following to .bash_profile
export PATH="/Users/rubiconred/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Install python 2.7.7
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.7
The CFLAGS
were required for Mac as per this.
git clone https://github.com/awslabs/serverless-application-model
cd serverless-application-model
pyenv local 2.7.14
pyenv virtualenv 2.7.14 samtranslator27
pyenv activate samtranslator27
pyenv local samtranslator27
pip install -r requirements/base.txt -r requirements/dev.txt
make test