edit-icon download-icon

Online installaltion of Alibaba Cloud CLI and SDK

Last Updated: Dec 21, 2017

Note: Use your 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, to avoid installation errors. In addition, Alibaba Cloud CLI needs to run in Python environment. To guarantee the correct installation of Alibaba Cloud CLI and Alibaba Cloud SDK, you must 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

Note: Make sure that you have installed wget.

If you have installed Python 2.7.x, skip this step.

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

  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 you have installed pip, skip this step.

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 has been successfully installed.

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

Install Alibaba Cloud CLI

  1. Upgrade pip.

    If you have installed pip version 7.x or later, skip this step.

    If the version of pip installed on your device is older than 7.x, the installation of Alibaba Cloud CLI fails. 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 has been 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 has been 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 select the SDKs of your products.

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

  1. sudo pip install aliyun-python-sdk-rds

If the following information is displayed, it indicates that the RDS SDK has been 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, see Alibaba Cloud Python SDK list.

Thank you! We've received your feedback.