Help Center> Data Lake Insight> SDK Reference> Preparing the Environment> Configuring the Python Environment

Configuring the Python Environment

Scenario

Table 1 describes the environment required for secondary development.

Table 1 Development environment

Item

Description

Operating system (OS)

Windows OS. Windows 7 or later is recommended.

Python installation

Python 2.7.10, 3.4.0, or later is recommended.

Python dependency installation

The DLI Python SDK dependencies include urllib3 1.15 or later, six 1.10 or later, certifi, and python-dateutil.

Procedure

  1. Download Python from Python's official website and install it.

    1. Install Python according to the Python official guidelines.
    2. Check whether the configurations succeed. Specifically, at the Start menu, enter cmd and press Enter to bring up the command prompt window. Enter python and press Enter. If the version information is displayed, as shown in Figure 1, Python is successfully installed and configured.
      Figure 1 Checking the configuration

  2. Install DLI Python SDK.

    1. Select the JAR package of the Downloading SDK and decompress the installation package.

      Decompress huaweicloud-dli-sdk-python-<version>.zip to a local directory that can be adjusted.

    2. Install the SDK.
      1. On a PC running the Windows OS, choose Start > Run, enter cmd, and press Enter.
      2. In the command-line interface (CLI) window, access the windows directory in the directory where huaweicloud-dli-sdk-python-<version>.zip is decompressed. For example, D:\tmp\huaweicloud-dli-sdk-python-1.0.0.
      3. Run the following command to install DLI Python SDK (During the installation, the third-party dependencies are automatically downloaded):

        python setup.py install

        Figure 2 shows the installation result.

        Figure 2 Installing Python SDK