10

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

4
  • What does echo $PATH output? Commented Nov 19, 2016 at 2:16
  • Please see updated answer Commented Nov 19, 2016 at 2:19
  • 1
    ~/.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. Commented Nov 19, 2016 at 2:25
  • 1
    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 ? Commented Nov 19, 2016 at 2:30

3 Answers 3

52

Use:

$ brew install awsebcli

as described in: Install the EB CLI on OS X

Homebrew is specifically for OSX and handles dependencies well.

Sign up to request clarification or add additional context in comments.

Comments

3
  • 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

Comments

0

The simplest way for mac users is to use homebrew

brew install awsebcli

An alternative that worked for me:

  1. Clone this repository Use the following:
git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
  1. Install/Upgrade the EB CLI MacOS/Linux On Bash or Zsh:
python ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py

Windows In PowerShell or in a Command Prompt window:

python .\aws-elastic-beanstalk-cli-setup\scripts\ebcli_installer.py
  1. After installation On Linux and macOS, the output contains instructions to add the EB CLI (and Python) executable file to the shell's $PATH variable, if it isn't already in it.

3.1 Usage The ebcli_installer.py Python script will install the awsebcli package in a virtual environment to prevent potential conflicts with other Python packages.

For most use cases you can execute the ebcli_installer.py script with no arguments.

python ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py

More information can be gotten here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.