Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing aws eb cli on Mac OS

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

like image 572
Robert Brax Avatar asked Nov 19 '16 02:11

Robert Brax


People also ask

Where should I install EB CLI?

The easiest and recommended way to install the EB CLI is to use the EB CLI setup scripts available on GitHub. Use the scripts to install the EB CLI on Linux, macOS, or Windows. The scripts install the EB CLI and its dependencies, including Python and pip . The scripts also create a virtual environment for the EB CLI.

What is EB CLI?

The EB CLI is a command line interface for AWS Elastic Beanstalk that provides interactive commands that simplify creating, updating and monitoring environments from a local repository. Use the EB CLI as part of your everyday development and testing cycle as an alternative to the Elastic Beanstalk console.


2 Answers

Use:

$ brew install awsebcli

as described in: Install the EB CLI on OS X

Homebrew is specifically for OSX and handles dependencies well.

like image 168
helloV Avatar answered Oct 20 '22 08:10

helloV


  • 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

like image 45
Sravya Avatar answered Oct 20 '22 07:10

Sravya