Menu
AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)

Install the Elastic Beanstalk Command Line Interface (EB CLI)

This topic describes how to install the Elastic Beanstalk Command Line Interface (EB CLI) version 3. The EB CLI is an interactive command line tool that makes it easy to create an application, configure it for use with Elastic Beanstalk, and deploy it to an Elastic Beanstalk environment. The EB CLI is developed in Python and requires Python version 2.7 or 3.4 in order to run.

Note

The EB CLI is not compatible with Python 3.5.

The primary distribution method for the EB CLI on Linux, Windows, and OS X is pip, a package manager for Python that provides an easy way to install, upgrade, and remove Python packages and their dependencies.

For OS X, updates to the EB CLI are distributed to both pip and Homebrew repositories. You can use either package manager to install the awsebcli package.

Install the EB CLI with Python and pip

The latest version of the EB CLI is always available in the pip repository. If you already have pip and a supported version of Python, you can install the EB CLI with the following command. Run this command using sudo (Linux, OS X, or Unix) or an administrator command prompt (Windows).

# pip install awsebcli

Note

Amazon Linux comes with Python 2.7 and pip starting with version 2015.03.

The EB CLI is updated regularly to add functionality that supports the latest Elastic Beanstalk features. When you need to update to the latest version of the EB CLI, use the upgrade option:

# pip install --upgrade awsebcli

If you need to uninstall the EB CLI, use pip uninstall:

# pip uninstall awsebcli

If you don't have Python and pip, use the procedure for your operating system, as follows.

Install Python, pip, and the EB CLI on Linux

The EB CLI requires Python 2.7 or 3.4. If your distribution did not come with Python, or came with an older version, install Python before installing pip and the EB CLI.

To install Python 2.7 on Linux

  1. Check to see if Python is already installed:

    $ python --version

    Note

    If your Linux distribution came with Python, you may need to install the Python developer package in order to get the headers and libraries required to compile extensions and install the EB CLI. Install the developer package (typically named python-dev or python-devel) using your package manager.

  2. If Python 2.7 or later is not installed, install it with your distribution's package manager. The command and package name varies:

    • On Debian derivatives such as Ubuntu, use APT:

      $ sudo apt-get install python2.7
    • On Red Hat and derivatives, use yum:

      $ sudo yum install python27
    • On SUSE and derivatives, use zypper:

      $ sudo zypper install python
  3. Open a command prompt or shell and run the following command to verify that Python installed correctly:

    $ python --version
    Python 2.7.9

Install pip by using the script provided by the Python Packaging Authority, and then install the EB CLI.

To install pip and the EB CLI

  1. Download the installation script from pypa.io:

    $ curl -O https://bootstrap.pypa.io/get-pip.py

    The script downloads and installs the latest version of pip and another required package named setuptools.

  2. Run the script with Python:

    $ sudo python27 get-pip.py
    Collecting pip
      Downloading pip-6.1.1-py2.py3-none-any.whl (1.1MB)
    Collecting setuptools
      Downloading setuptools-15.0-py2.py3-none-any.whl (501kB)
    Installing collected packages: pip, setuptools
    Successfully installed pip-6.1.1 setuptools-15.0

    Invoking version 2.7 of Python directly by using the python27 command instead of python ensures that pip is installed in the proper location, even if an older system version of Python is present on your system.

  3. Finally, use pip to install the EB CLI.

    $ sudo pip install awsebcli
    Collecting awsebcli
      Downloading awsebcli-3.2.2.tar.gz (828kB)
    Collecting pyyaml>=3.11 (from awsebcli)
      Downloading PyYAML-3.11.tar.gz (248kB)
    Collecting cement==2.4 (from awsebcli)
      Downloading cement-2.4.0.tar.gz (129kB)
    Collecting python-dateutil<3.0.0,>=2.1 (from awsebcli)
      Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
    Collecting jmespath>=0.6.1 (from awsebcli)
      Downloading jmespath-0.6.2.tar.gz
    Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->awsebcli)
      Downloading six-1.9.0-py2.py3-none-any.whl
    Installing collected packages: pyyaml, cement, six, python-dateutil, jmespath, awsebcli
      Running setup.py install for pyyaml
      Running setup.py install for cement
      Running setup.py install for jmespath
      Running setup.py install for awsebcli
    Successfully installed awsebcli-3.2.2 cement-2.4.0 jmespath-0.6.2 python-dateutil-2.4.2 pyyaml-3.11 six-1.9.0

    Note

    If you installed a new version of Python alongside an older version that came with your distribution, you may get an error like the following when trying to invoke pip with sudo:

    sudo: pip: command not found

    To work around this issue, use which pip to locate the executable, and then invoke it directly by using an absolute path when installing the EB CLI:

    $ which pip
    /usr/local/bin/pip
    $ sudo /usr/local/bin/pip install awsebcli
  4. Verify that the EB CLI installed correctly by checking its version:

    $ eb --version
    EB CLI 3.2.2 (Python 2.7.9)

Install Python, pip, and the EB CLI on Windows

The Python Software Foundation provides installers for Windows that include pip.

To install Python 3.4, pip, and the EB CLI on Windows

  1. Download and install Python 3.4 from the downloads page of Python.org.

  2. Add the Python home and scripts directories to the Windows Path system variable:

    C:\WINDOWS\system32;C:\WINDOWS;C:\Python34;C:\Python34\Scripts
  3. Open the Windows Command Processor from the Start menu.

  4. Verify that Python and pip are both installed correctly with the following commands:

    C:\Windows\System32> python --version
    Python 3.4.3
    C:\Windows\System32> pip --version
    pip 6.0.8 from C:\Python34\lib\site-packages (python 3.4)
  5. Install the EB CLI using pip:

    C:\Windows\System32> pip install awsebcli
    Collecting awsebcli
      Downloading awsebcli-3.2.2.tar.gz (828kB)
    Collecting pyyaml>=3.11 (from awsebcli)
      Downloading PyYAML-3.11.tar.gz (248kB)
    Collecting cement==2.4 (from awsebcli)
      Downloading cement-2.4.0.tar.gz (129kB)
    Collecting python-dateutil<3.0.0,>=2.1 (from awsebcli)
      Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
    Collecting jmespath>=0.6.1 (from awsebcli)
      Downloading jmespath-0.6.2.tar.gz
    Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->awsebcli)
      Downloading six-1.9.0-py2.py3-none-any.whl
    Installing collected packages: six, jmespath, python-dateutil, cement, pyyaml, awsebcli
      Running setup.py install for jmespath
      Running setup.py install for cement
      Running setup.py install for pyyaml
        checking if libyaml is compilable
        Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
        skipping build_ext
      Running setup.py install for awsebcli
        Installing eb-script.py script to C:\Python34\Scripts
        Installing eb.exe script to C:\Python34\Scripts
        Installing eb.exe.manifest script to C:\Python34\Scripts
    Successfully installed awsebcli-3.2.2 cement-2.4.0 jmespath-0.6.2 python-dateutil-2.4.2 pyyaml-3.11 six-1.9.0
  6. Verify that the EB CLI is installed correctly:

    C:\Windows\System32> eb --version
    EB CLI 3.2.2 (Python 3.4.3)

Install the EB CLI on OS X

If you use the Homebrew package manager, you can install the EB CLI with the brew command. You can also install Python and pip, and then use pip to install the EB CLI.

Install the EB CLI with Homebrew

If you have Homebrew, you can use it to install the EB CLI. The latest version of the EB CLI is typically available from Homebrew a couple of days after it appears in pip.

To install the EB CLI with Homebrew

  1. Run brew install awsebcli:

    $ brew install awsebcli
  2. Verify that the EB CLI is installed correctly:

    $ eb --version
    EB CLI 3.2.2 (Python 3.4.3)

Install Python, pip, and the EB CLI on OS X

You can install the latest version of Python and pip and then use them to install the EB CLI.

To install the EB CLI on OS X 10.6 or earlier

  1. Download and install Python 3.4 from the downloads page of Python.org.

  2. Install pip by using the script provided by the Python Packaging Authority.

    $ curl -O https://bootstrap.pypa.io/get-pip.py
    $ python3 get-pip.py
  3. Use pip to install the EB CLI.

    $ sudo pip install awsebcli

    If you see an error regarding the version of six that came with distutils in El Capitan, use the --ignore-installed option:

    $ sudo pip install awsebcli --ignore-installed six
  4. Verify that the EB CLI is installed correctly:

    $ eb --version
    EB CLI 3.2.2 (Python 3.4.3)

To upgrade to the latest version, use the --upgrade option:

$ sudo pip install --upgrade awsebcli