user_mda
user_mda

Reputation: 19388

awscli not in the path on macOS

I have so far tried installed awscli via the commandline and via the interactive installer , using brew and pip however I cannot use the aws command due to path configuration

which aws

/usr/local/bin

But when I try

aws --version I get

/Library/Frameworks/Python.framework/Versions/2.7/bin/aws: No such file or directory

How can I have aws command run from the correct location? I also tried running aws command from /usr/local/bin but have the same error

I have tried this in a new shell and this is aws cli v2 also tried this

type aws
aws is hashed (/Library/Frameworks/Python.framework/Versions/2.7/bin/aws)

Upvotes: 0

Views: 2375

Answers (2)

Femi James
Femi James

Reputation: 1

If having issues updating/upgrading the awscliv1 to v2. Take the following step:

  1. rm -rf /bin/aws
  2. curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
  3. unzip awscliv2.zip
  4. ./aws/install -i /usr/local/aws -b /bin export the PATH to the bin/aws previously remove
  5. export PATH=$PATH:/usr/local/bin/aws

Upvotes: 0

Narkanister
Narkanister

Reputation: 904

Same issue:

$ /usr/local/bin/aws --version

aws-cli/2.0.23 Python/3.7.4 Darwin/19.4.0 botocore/2.0.0dev27

Solution:

export PATH=$PATH:/usr/local/bin/aws

Upvotes: 3

Related Questions