user6147554
user6147554

Reputation:

aws-cli not found on macOS

I'm on macOS 10.13 and I've a problem after installed aws-cli. I can't use aws command in my CLI.

I've installed aws-cli with pip 18.0 used this command:

pip install awscli --upgrade --user

After that, aws command didn't work so I've checked the aws-cli install directory with this command:

python -c 'import awscli; print(awscli)'

Output:/Users/XXXXX/Library/Python/2.7/lib/python/site-packages/awscli/__init__.pyc

And I add it the output in my PATH directory, under the PATH for python. PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3:${PATH} export PATH=$HOME/Library/Python/2.6/bin:$PATH

Unfortunate, aws commands still doesn't works. I've checked and followed steps at https://docs.aws.amazon.com/cli/latest/userguide/installing.html but wasn't resolve my problem.

What's wrong with my process ? Do you have solution for me ?

Upvotes: 4

Views: 21028

Answers (3)

Zenville Erasmus
Zenville Erasmus

Reputation: 109

In my case, I make use of Python 3 alongside Anaconda.

I therefore installed the awscli with conda install awscli.

conda list returns:

awscli 1.16.133 py36_0 conda-forge

I also exported the aws program path and loaded the profile into the current session:

$ echo 'export PATH="~/.local/bin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile

Now aws --version returns:

aws-cli/1.16.133 Python/3.6.7 Darwin/18.2.0 botocore/1.12.123

Good to go! :)

Upvotes: 3

Ashok Reddy
Ashok Reddy

Reputation: 1085

The package is named "awscli". The program is named "aws".

If executing aws does not launch the program, then your path is not correct, export aws program path by below command

export PATH=~/.local/bin:$PATH

Upvotes: 5

John Hanley
John Hanley

Reputation: 81454

The package is named "awscli". The program is named "aws".

If executing aws does not launch the program, then your path is not correct.

Follow this link for Mac OSX specific instructions:

Adding the AWS CLI Executable to your Command Line Path

In your question, I noticed that you are mixing your PATH statement with both Python 2 and Python 3. For Python 2, you are mixing 2.6 and 2.7. I would clean that up first. Then follow the AWS instructions for installation.

Upvotes: 8

Related Questions