DEV Community

Stevo Perisic
Stevo Perisic

Posted on

Installing Python3, Pip and AWS CLI on macOS Sierra

A quick guide to installing Python v3, Pip package manager and the AWS CLI on the Mac OS Sierra. This write up assumes you only have Python 2.7 that came pre-installed on the Mac and Homebrew installed. If you need Homebrew please visit https://brew.sh/ and get it than come back here for the rest of the guide.

First let’s get Python 3 installed by running (If you had Homebrew installed it might update when you call the install command as it did for me. you might need to re-run the below install command.):


~ brew install python3

At this point, you have the system Python 2.7 available and the Homebrew version of Python 3 as well. Launch the system Python 2.7 using ~ python and Pyhton 3 using ~ python3 commands respectively.

You’ll be able to start Pip 3 using the ~ pip3 command.

Now let’s install AWS CLI.


~ pip3 install awscli --upgrade --user

Verify the install using:


~ aws --version

In my case I had to add the Python 3 location to the $PATH variable, you might have to do it also. Here’s how:


~ export PATH=~/Library/Python/3.6/bin:$PATH

Check the aws install one more time:


~ aws --version
aws-cli/1.11.185 Python/3.6.3 Darwin/16.7.0 botocore/1.7.43

Now you should be all set :)

You will have to set up the credentials within the AWS CLI, you can get those values from the “My Security Credentials” menu link under your username in the Amazon dashboard.

Just in case you need them, here are some references:

Installing Python 3 on Mac OS X - The Hitchhiker's Guide to Python

Install the AWS Command Line Interface on macOS - AWS Command Line Interface

Top comments (0)