When you use Alibaba Cloud SDK V1.0 for Python for development, you must correctly integrate the Core SDK and SDKs of Alibaba Cloud services as dependencies. This topic describes how to configure and manage these dependencies.
Before you use Alibaba Cloud SDK V1.0 for Python, you must install the core library aliyun-python-sdk-core
. For example, if you want to use the SDK of Elastic Compute Service (ECS), you must install the aliyun-python-sdk-core
and aliyun-python-sdk-ecs
libraries.
The core library aliyun-python-sdk-core
is automatically installed when you install the dependency library aliyun-python-sdk-ecs
.
Run the pip command to install an SDK as a dependency
Install the core library.
pip install aliyun-python-sdk-core
Install the SDK of an Alibaba Cloud service. In this example, perform the following steps to install ECS SDK:
Go to SDK Center.
In the top navigation bar, move the pointer over Cloud Products and choose Computing > Elastic Compute Service.
On the page that appears, select an API version. If multiple versions are available, select the recommended or latest version.
Set the SDK Version parameter to V1.0.
Set the All languages parameter to Python.
Copy the command from the Installation Method section, paste the command to the terminal, and then run the command.
pip install aliyun-python-sdk-ecs