I cannot install aws cli on mac os with pip - awscli: command not found

MacosAmazon Web-ServicesTerminalPipAws Cli

Macos Problem Overview

I tried to follow this tutorial.

This is what I did in the console:

pip3 install --user --upgrade awscli

after that, when I write:

pip3 --version

I'm getting:

pip 9.0.1 from /Users/user/Library/Python/3.4/lib/python/site-packages (python 3.4)

then I wrote:

pip3 install --user --upgrade awscli

this command downloaded awscli and automatically added this:

# Setting PATH for Python 3.4
# The orginal version is saved in .profile.pysave
export PATH

to my .profile

Later on, just to be sure, I wrote:

source ~/.profile

and then when I type:

user$ aws
-bash: aws: command not found

I restarted the terminal with no luck also.

What's the problem here?

Macos Solutions

Solution 1 - Macos

Here are the two steps to install AWS cli on mac OSX


Offical version
  • brew install awscli


Development version
  • brew install awscli --HEAD

Solution 2 - Macos

When "pip3 install" is called with the "--user" option, it installs the aws executable in a user-specific location. This can be one of many possible locations, but the best way to find out where is with this command:

python3 -m site --user-base

On my system, this returned:

  • /Users/[myusername]/Library/Python/3.6

This directory has a "bin" subdirectory, and that is where the "aws" executable was located.

I figured this out from following:

Solution 3 - Macos

Simple do these three steps:

curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip 
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

Solution 4 - Macos

brew install awscli should work

Solution 5 - Macos

This is what worked for me, I experienced permission issues and had to create a local Frameworks folder first before running brew install. using macOS High Sierra

sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks
brew install awscli

Solution 6 - Macos

To answer the original question about installing using pip:

sudo pip install --upgrade pip
sudo easy_install nose
sudo easy_install tornado
sudo easy_install six
sudo pip install --ignore-installed awscli

worked for me on Mojave

Solution 7 - Macos

I had similar error, when trying to install awscli. I was following steps mentioned here by amazon [https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html]

I use anaconda, so when I was using pip3 install awscli --upgrade --user it installs awscli in /Users/username/.local/lib/python3.6/

So, I used following to update awscli to anaconda-

conda install -c conda-forge awscli

Solution 8 - Macos

I have used the following commands to install awscli :

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" $ unzip awscli-bundle.zip $ ./awscli-bundle/install -b ~/bin/aws

check version using : /Users/xxx/bin/aws --version configure using : /Users/xxx/bin/aws configure

Solution 9 - Macos

Was facing a similar issue. Resolved it by installing python 3.9 using brew install.

>brew install [email protected]

Then reinstall awscli

Solution 10 - Macos

I followed the below steps and it works for MacOS 10.11

curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"

Unzip the package.

unzip awscli-bundle.zip

And instead of given command:

'sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws'

which is broken due to pip, I think, I used the below command and it worked for me.

python3.6 ./awscli-bundle/install -b ~/bin/aws


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3766930View Question on Stackoverflow
Solution 1 - MacosDurul DalkanatView Answer on Stackoverflow
Solution 2 - MacosPeteH32View Answer on Stackoverflow
Solution 3 - MacosAnubhav GuptaView Answer on Stackoverflow
Solution 4 - MacosAkash YellappaView Answer on Stackoverflow
Solution 5 - Macosmel3kingsView Answer on Stackoverflow
Solution 6 - MacosAlex WView Answer on Stackoverflow
Solution 7 - MacosDhananjay MehtaView Answer on Stackoverflow
Solution 8 - Macostrupti rathView Answer on Stackoverflow
Solution 9 - MacosShreehariView Answer on Stackoverflow
Solution 10 - MacosVijay KumarView Answer on Stackoverflow