This topic describes how to build a Python development environment on an on-premises
machine to run VPC SDK for Python demos. Alibaba Cloud SDK for Python supports Python
2.7 and 3.x. Before you can run VPC SDK for Python demos, you must install the core
library of Alibaba Cloud SDK for Python and VPC SDK for Python. Alibaba Cloud SDK
for Python supports Windows, Linux, and Mac. All VPC SDK for Python demos in this
example run on the Windows operating system.
Procedure
- Install Python.
This example shows how to install Python 3.9.6 on Windows.
- Open the download link of Python.
- Download Python 3.9.6.
- After you download Python 3.9.6, double-click the installation package to open the
wizard. Use the default settings and select Add Python 3.9 to PATH.
- Click Install Now to install Python.
- After the installation is complete, click Close.
- In the cmd command prompt, run the
python
command. After Python is installed, the Python interactive environment is launched.
In this case, the following output is displayed: Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
- In the cmd command prompt, run the following command to install the core library of Alibaba
Cloud SDK for Python.
Note Alibaba Cloud SDK for Python supports the original SDK and the upgraded SDK. In this
example, the upgraded SDK is installed.
pip install alibabacloud_tea_openapi
For more information about Python and PIP, see Python documentation and PIP documentation.
- In the cmd command prompt, run the following command to install
alibabacloud_vpc20160428
: pip install alibabacloud_vpc20160428==2.0.0