Online installaltion of Alibaba Cloud CLI and SDK

Last Updated: Oct 08, 2016

Notice: Use root account to log on to your system, because you need root permission to run all the installation commands.

Pip is an automated management tool. So we recommend that you use pip to install Alibaba Cloud CLI when your device is connected to the Internet, in order to avoid many installation errors. In addition, Alibaba Cloud CLI needs to run in Python environment. To ensure the correct installation of Alibaba Cloud CLI and Alibaba Cloud SDK, you need to install Python, pip, Alibaba Cloud CLI and Alibaba Cloud SDK in sequence according to the following instructions.

Prerequisites

  • Operating system: Linux/UNIX or Mac OS.

  • Operating environment: Python 2.7.x.

Install Python

If Python 2.7.x is installed on your device, skip this instruction.

If you have not installed Python 2.7.x, run the following command to install Python.

Notice: Ensure your device is installed with wget.

  1. wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz (or download the Python installation package through other method and store it in a folder)
  2. tar -zxvf Python-2.7.8.tgz
  3. cd Python-2.7.8
  4. ./configure
  5. make
  6. sudo make install

Install pip

If pip is installed on your device, skip this instruction.

If you have not installed pip, run the following command to install pip.

  1. curl "https://bootstrap.pypa.io/get-pip.py" -o "pip-install.py"
  2. sudo python pip-install.py

If the following information is displayed, it indicates that pip was successfully installed.

  1. Successfully installed pip-7.1.2 setuptools-18.7 wheel-0.26.0

Install Alibaba Cloud CLI

  1. If pip version 7.x or later is installed on your device, skip this step.

    If the version of pip installed on your device is older than 7.x, the installation of Alibaba Cloud CLI will fail. You can use the following command to upgrade pip first.

    Run the following command to upgrade pip.

    1. sudo pip install -U pip

    If the following information is displayed, it indicates that pip was successfully upgraded.

    1. Successfully uninstalled pip-7.1.2
    2. Successfully installed pip-8.1.2
  2. Run the following command to install Alibaba Cloud CLI.

    1. sudo pip install aliyuncli

    If the following information is displayed, it indicates that Alibaba Cloud CLI was successfully installed.

    1. Successfully installed aliyuncli-2.1.2 colorama-0.3.3 jmespath-0.7.1

Install SDK

Alibaba Cloud CLI must be used along with the SDKs of Alibaba Cloud products. For ease of use, the installation of Alibaba Cloud CLI is separated from the installation of SDKs. You do not need to download all SDKs, but just select the SDKs of your desired products.

Taking the product RDS as an example, run the following command to install the RDS SDK.

  1. ```shell
  2. sudo pip install aliyun-python-sdk-rds
  3. ```

If the following information is displayed, it indicates that the RDS SDK was successfully installed.

  1. ```shell
  2. Successfully installed aliyun-python-sdk-core-2.0.35 aliyun-python-sdk-rds-2.0.3
  3. ```

For more information about the SDKs of Alibaba Cloud products, refer to Alibaba Cloud Python SDK list.

Thank you! We've received your feedback.