Before using the Python SDK for the Content Moderation API, make sure that you have installed pip and then use pip to install Python dependencies.

  • If you are using Python 2.x, run the following commands to install the SDK core library:
    sudo pip install aliyun-python-sdk-core==2.13.10
    pip install -v aliyun-python-sdk-green==3.5.1 //Install the Python SDK of the specified version.
    pip install oss2 //Install the Object Storage Service (OSS) dependency.
  • If you are using Python 3.x, run the following commands to install the SDK core library:
    sudo pip install aliyun-python-sdk-core-v3==2.13.10
    pip install -v aliyun-python-sdk-green==3.5.1 //Install the Python SDK of the specified version.
    pip install oss2 //Install the OSS dependency.
  • Click the following link to download the extension package: https://aligreen-shanghai-share.oss-cn-shanghai.aliyuncs.com/aliyun-python-sdk-green-extension.zip