7
votes

I follow the instructions from here:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html

This pip install --upgrade --user awsebcli ran fine but when I type $ eb

it says command not found.

Apparently I must modify path variable:

echo $SHELL. gives me: /bin/bash.

Here are the instructions:

1) Find your shell's profile script in your user folder. If you are not sure which shell you have, run echo $SHELL.

$ ls -a ~
.  ..  .bash_logout  .bash_profile  .bashrc  Desktop  Documents  Downloads
Bash – .bash_profile, .profile, or .bash_login.
Zsh – .zshrc
Tcsh – .tcshrc, .cshrc or .login.

2) Add an export command to profile script.

export PATH=~/.local/bin:$PATH
This command adds a path, `~/.local/bin` in this example, to the current PATH variable.

3) Load the profile into your current session.

$ source ~/.bash_profile

This doesn't make any sense to me: why should i run $ ls -a ~ ? I ran

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

and it didn't change anything. Same for 3.

Please advise on how to get eb working. Thanks.

UPDATE:echo $PATH gives me:

/Users/ME/bin/bash:/Users/ME/bin/bash.:/Users/ME/.local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/mysql-5.7.11-osx10.9-x86_64/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/ME/.local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/mysql-5.7.11-osx10.9-x86_64/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet

2
What does echo $PATH output?helloV
Please see updated answerRobert Brax
~/.local/bin is just an example. For OSX, it is different. Check the instructions again. I suggest you just do $ brew install awsebcli which takes care of everything.helloV
Thanks it fixed it with brew. You can add this as an answer. Why does brew take care of this and not the other way ? Is brew smarter when it comes to those procedures ?Robert Brax

2 Answers

44
votes

Use:

$ brew install awsebcli

as described in: Install the EB CLI on OS X

Homebrew is specifically for OSX and handles dependencies well.

2
votes
  • If you are trying to install EB CLI for default python version on mac, you can simply use:

    $brew install awsebcli
    
  • If you are intending to install for python3, use pip3 to install and add export path to the bash profile as you mentioned. The path should be directed to the bin of python3 installed on your mac.

    Example:

    export PATH=~/Library/Python/3.7/bin:$PATH
    

For more details, refer: https://medium.com/@stevo.perisic/installing-python3-pip-and-aws-cli-on-macos-sierra-ca23ff8ad651