Install Python via pyenv
Install dependencies
sudo apt-get update sudo apt-get install make build-essential libssl-dev
zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm
libncurses5-dev libncursesw5-dev \ xz-utils tk-dev libffi-dev liblzma-dev
Install pyenv
https://github.com/pyenv/pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv echo 'export
PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc echo 'export
PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc echo -e 'if command -v pyenv
1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
Close and reopen your terminal, or: source ~/.bashrc
Check Installation: command -v pyenv
Install pyenv-virtualenv
https://github.com/pyenv/pyenv-virtualenv
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv
root)/plugins/pyenv-virtualenv echo 'eval "$(pyenv virtualenv-init -)"' >>
~/.bashrc
Close and reopen your terminal, or: source ~/.bashrc
Install Python
To install a specific python version using pyenv and set it as your global python, then run the following substituting in your desired python version:
pyenv install <python_version> pyenv global <python_version> pip install --
upgrade pip
Check installation: python --version
To create a virtualenv based on the currently active python version:
pyenv virtualenv
To automatically activate and deactivate a virtualenv on entering a relevant
directory then create a file at the desired level, e.g. at the .python-version root of the a folder to activate the virtual env for a repos. The file should just contain the name of the virtualenv you wish to activate.
Install AWS CLI
http://docs.aws.amazon.com/cli/latest/userguide/installing.html
#Activate your virtualenv pyenv activate <virtualenv_name>
pip install awscli
Configure AWS CLI
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html Generate a access key: Login to the AWS console Navigate to your user in IAM Generate yourself a Access Key Download the .csv Run the following in the terminal:
aws configure
#When prompted enter the following: # - enter generated AWS Access Key ID #
- enter generated AWS Secret Access Key # - us-west-2 # - json