Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 641
user3766930 Avatar asked Apr 08 '17 22:04

user3766930


People also ask

Can we install AWS CLI using PIP?

You can install version 1 of the AWS Command Line Interface (AWS CLI) on Windows by using a standalone installer (recommended) or pip , which is a package manager for Python.

Which command can be used to install the AWS CLI on Mac OSX?

Use the curl command – The -o option specifies the file name that the downloaded package is written to. The options on the following example command write the downloaded file to the current directory with the local name awscliv2.zip .

What is PIP install AWS CLI?

$ pip install awscli --upgrade --userThe --upgrade option tells pip to upgrade any requirements that are already installed. The --user option tells pip to install the program to a subdirectory of your user directory to avoid modifying libraries used by your operating system.


2 Answers

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
like image 184
Durul Dalkanat Avatar answered Sep 21 '22 20:09

Durul Dalkanat


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:

  • pip3 install --help
  • https://docs.python.org/3/library/site.html#module-contents
like image 34
PeteH32 Avatar answered Sep 20 '22 20:09

PeteH32