70

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
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
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?

5
  • 4
    Have you checked whether the executables are indeed at /Library/Frameworks/Python.framework/Versions/3.4/bin/? Since you installed with the user scheme (--user), I would expect that the executables should be at somewhere like ~/Library/Python/3.4/bin/ instead. Commented Apr 9, 2017 at 0:09
  • @LeoC yes, you are absolutely correct! the other path works. Do you bother to add it as an answer? Commented Apr 9, 2017 at 0:32
  • 1
    Glad that it helps. Nah, too lazy – thanks for asking though. Commented Apr 9, 2017 at 0:54
  • 3
    The easiest way to install the AWS CLI on MacOS is with Homebrew: brew install awscli Commented Apr 9, 2017 at 6:41
  • if you have brew us: brew install awscli brew install awsebcli Commented Aug 29, 2017 at 21:41

10 Answers 10

125

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

FIRST

Offical version

  • brew install awscli

SECOND

Development version

  • brew install awscli --HEAD
Sign up to request clarification or add additional context in comments.

4 Comments

That worked for me as well, but I don't know that "Official Version" is the correct tile, since brew isn't mentioned on docs.aws.amazon.com/cli/latest/userguide/…
This would result in "Permission Denied" now. "sudo" won't work either caz it's not allowed any more.. can anyone updates?
I had Permission Denied issue as well, see my answer on what worked for me below
sheesh, why don't they just say this in the aws documentation!
69

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:

3 Comments

Have sent a feedback on the aws documentation link - docs.aws.amazon.com/cli/latest/userguide/…. Hopefully it would be corrected soon.
dovetails with github.com/rajivkanaujia/alphaworks/wiki/…, but can't upvote his answer.
This didn't work for me when using pip3 install awscli --upgrade --user since my .local never created a bin subdirectory.
27

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

2 Comments

Worked for me on Centos 7, used it as workaround for pip install --user --upgrade awscli => aws => aws: command not found. Also found an official docs here: docs.aws.amazon.com/cli/latest/userguide/…
Neither pip, nor brew worked. Got all sorts of errors. this worked like a charm.
15

brew install awscli should work

Comments

9

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

1 Comment

Simply running sudo mkdir /usr/local/Frameworks (no chown) worked for me. macOS High Sierra 10.13.3
4

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

1 Comment

Worked for me. brew install awscli was giving me a hard time, this is a good alternative.
1

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

Comments

0

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

Comments

0

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

brew install [email protected]

Then reinstall awscli

Comments

-1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.