Skip to content

Instantly share code, notes, and snippets.

@liladas
Created November 18, 2019 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liladas/c1e96a80eb0ec174fb225c23be2fe5b3 to your computer and use it in GitHub Desktop.
Save liladas/c1e96a80eb0ec174fb225c23be2fe5b3 to your computer and use it in GitHub Desktop.
Installing SAM w/ Python 3.7
# there is some trickyness installing AWS SAM CLI on Ubuntu 16.04
# Official documentation recommends using Linux Homebrew... uhm nope.
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-linux.html
# SAM needs Python3.6+ and a blanket install sort fucks up the system and other apps.
# Install requirements
sudo apt-get install -y build-essential \
checkinstall \
libreadline-gplv2-dev \
libncursesw5-dev \
libssl-dev \
libsqlite3-dev \
tk-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
zlib1g-dev \
openssl \
libffi-dev \
python3-dev \
python3-setuptools \
wget
# Prepare to build
mkdir /tmp/Python37
cd /tmp/Python37
# Pull down Python 3.7, build, and install
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar xvf Python-3.7.0.tar.xz
cd /tmp/Python37/Python-3.7.0
./configure
sudo make altinstall
python3.7 --version
# use 3.7 pip to install the SAM tool
pip3.7 install aws-sam-cli
sam --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment