All Products
Search
Document Center

Simple Log Service:Install Simple Log Service SDK for Python

Last Updated:Nov 26, 2024

This topic explains how to install the Simple Log Service SDK for Python, enabling you to invoke the interfaces of the SDK within your code.

Prerequisites

  • Python and a Python development environment, such as PyCharm, are installed.

    The Simple Log Service SDK for Python is compatible with PyPy 2, PyPy 3, and Python versions 2.6, 2.7, and 3.3 through 3.9, as well as later versions. Use the python -V command to verify your Python version.

  • The Python package manager pip is installed.

    To verify the installed version of pip, execute the pip -V command. For Python 3 and later, use pip3 -V instead.

Install the SDK

Run the following commands as an administrator in your CLI to install the Simple Log Service SDK for Python:

pip install -U aliyun-log-python-sdk

For more information, see aliyun-log-python-sdk releases.

Verify the SDK

After the Simple Log Service SDK for Python is installed, run the following command to verify it:

pip show aliyun-log-python-sdk

If the following response is returned, the SDK is installed:

Name: aliyun-log-python-sdk
Version: 0.9.12
Summary: Aliyun log service Python client SDK
Home-page: https://github.com/aliyun/aliyun-log-python-sdk
Author: Aliyun

FAQ

Why is pip not recognized as an internal or external command?

In Windows, if the error 'pip' is not recognized as an internal or external command appears, add the installation paths of Python and pip to the Path environment variable. In most cases, the installation path of pip is the Scripts folder in the Python installation directory. After you configure the settings, you may need to restart your computer to apply the environment variable.