34

I'm on macOS Mojave Version 10.14.5.

I was following the instructions here

Installing the AWS CLI

when I got to the part to type

aws --version

in terminal, and got the response

-bash: aws: command not found

Here's a screenshot of terminal

terminal

I looked at the other posts similar to this on stackoverflow, but they seem to apply to different contexts. They have not helped.

daniel
  • 1,446
  • 3
  • 29
  • 65

4 Answers4

55

you need to install python and pip on your mac in order to install the awscli. After the installation of python and pip, please use following command to install aws cli with latest version from AWS.

sudo pip install awscli --force-reinstall --upgrade

Kc Bickey
  • 1,166
  • 12
  • 11
3

Install python version 3 or higher And Use this command to download aws cli with python3

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

use AWS official guide here to ensure you are installing the latest version.

I have mac and this fixed the issue

$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /
Amir Imani
  • 3,118
  • 2
  • 22
  • 24
1

This command works good for me

sudo apt install awscli
Alwin Jose
  • 696
  • 1
  • 5
  • 13
  • When I try that I get: `The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt. Please visit http://www.java.com for information on installing Java.` – 1.21 gigawatts Apr 18 '23 at 17:27