Before you use Content Moderation SDK for Python, you must install pip and then use pip to install Python dependencies.
Prerequisites
- Python 2.x or Python 3.x is used.
- The python-pip dependency library is installed on the source server.
For example, you can run the following commands to install the python3-pip dependency library for specific Linux distributions:
- CentOS and Red Hat Enterprise Linux:
yum -y install python3-pip
- Ubuntu and Debian:
apt-get -y install python3-pip
- OpenSUSE and SUSE:
zypper -n install python3-pip
- CentOS and Red Hat Enterprise Linux:
Install the SDK
- If you are using Python 2.x, run the following commands to install the Alibaba Cloud
SDK core library:
sudo pip install aliyun-python-sdk-core==2.13.10 pip install -v aliyun-python-sdk-green==3.6.2 // Install the 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 Alibaba Cloud
SDK core library:
sudo pip install aliyun-python-sdk-core-v3==2.13.10 pip install -v aliyun-python-sdk-green==3.6.2 // Install the SDK of the specified version. pip install oss2 // Install the OSS dependency.
- If you want to submit a local or binary file for content moderation, download and import the Extension.Uploader utility class into your project.