Configuring the Python Environment
Scenario
If you are preparing for secondary development, you need to deploy the environment as required in Table 1.
Item |
Description |
---|---|
Operating system (OS) |
Windows OS. Windows 7 or later is recommended. |
Python |
Python 2.7.10, 3.4.0, or later versions are required. The Visual C++ compilation environment is required, and Visual C++ build tools or Visual Studio must be installed. |
Python dependencies |
The DLI Python SDK dependencies include urllib3 1.15 or later, six 1.10 or later, certifi, and python-dateutil. |
Procedure
- Download Python from Python's official website and install it.
- Install Python according to the Python official guidelines.
- 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.
If an error similar to "error: Microsoft Visual C++ xx.x is required. Get it with Build Tools for Visual Studio" is reported when you install the Python application package, the C++ compiler may not been installed. Install the Visual Studio compiler of the required version. For some OSs, restart the system after Visual Studio is installed
- Install DLI Python SDK.
- Select the package of the Downloading SDK and decompress the installation package.
Decompress dli-sdk-python-<version>.zip to a local directory that can be adjusted.
- Install the SDK.
- On a PC running the Windows OS, choose Start > Run, enter cmd, and press Enter.
- In the command-line interface (CLI) window, access the windows directory in the directory where dli-sdk-python-<version>.zip is decompressed. For example, D:\tmp\dli-sdk-python-1.0.8.
- Run the following command to install DLI Python SDK (During the installation, the third-party dependencies are automatically downloaded):
Figure 2 shows the installation result.
- Select the package of the Downloading SDK and decompress the installation package.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.