This topic describes how to build a Python development environment on an on-premises machine to run Virtual Private Cloud (VPC) SDK for Python demos. Alibaba Cloud SDK for Python supports Python 2.7. To 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 the Windows, Linux, and Mac operating systems. All VPC SDK for Python demos run on a Windows system.

Procedure

  1. Install Python.
    1. Open the Python download web page.
    2. Download Python 2.7.

      Select and download the required installation package from the download list. The package is in the python-XYZ.msi format and XYZ is the version number.

    3. Double-click the package to open the Python installation wizard and use the default settings to install Python.
    4. Set environment variables.
      Add the python installation path and the directories of the PIP program to the Path field. Separate multiple directories with semicolons (;).
      C:\Python27;C:\Python27\Scripts
    5. In the cmd window, run the python command. After Python is installed, the Python interactive environment is launched. In this case, the following output is displayed:
      Python 2.7.15 (
      Type "help", "copyright", "credits" or "license" for more information.
      >>>
          v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AM
      D64)] on win32                        
  2. Run the following command to install the core library of Alibaba Cloud SDK for Python.
    pip install aliyun-python-sdk-core

    For more information about Python and PIP, see Python documentation and PIP documentation.

  3. Run the following command to install aliyun-python-sdk-vpc.
    pip install aliyun-python-sdk-vpc