This topic describes the Python runtime environments in which you can write function code in Function Compute.

Python runtime environments

The following table describes the Python runtime environments that are supported by Function Compute.

VersionIdentifierOperating SystemArchitecture
Python 3.10 (in public preview)python3.10Debian 10x86_64
Python 3.9python3.9Debian 9x86_64
Python 3.6python3Debian 9x86_64
Important The Python 2.7 runtime is no longer supported by Function Compute. For more information, see Runtime deprecation policy.

Built-in python modules

In addition to standard modules, the Python runtime environments in Function Compute provide common modules that you can directly use. The following tables describe the modules that are provided by Python runtime environments.

Python 3.10 (public preview)

ModuleDescriptionVersion
oss2OSS SDK2.16.0
tablestoreTablestore SDK5.4.1
aliyun-fc2FC SDK2.5.2
aliyun-python-sdk-ecsECS SDK4.24.26
aliyun-python-sdk-vpcVPC SDK3.0.27
aliyun-python-sdk-rdsRDS SDK2.7.2
aliyun-python-sdk-kmsKMS SDK2.16.0
aliyun-mnsMNS SDK1.1.5
aliyun-python-sdk-cdnCDN SDK3.7.8
aliyun-python-sdk-ramRAM SDK3.2.0
aliyun-python-sdk-stsSTS SDK3.1.0
aliyun-python-sdk-iotIoT SDK8.47.0
aliyun-log-python-sdkSLS SDK0.8.0
wandWand0.6.10
scrapyScrapy2.7.1
PyMySQLPyMySQL1.0.2
elasticsearchElasticsearch Python Client8.5.2
PillowPillow9.3.0
pyOpenSSLpyOpenSSL1.0.2
redisredis-py4.4.0
requestsHTTP2.28.1

Python 3.9

ModuleDescriptionVersion
oss2OSS SDK2.15.0
tablestoreTablestore SDK5.2.1
aliyun-fc2FC SDK2.5.0
aliyun-python-sdk-ecsECS SDK4.24.11
aliyun-python-sdk-vpcVPC SDK3.0.15
aliyun-python-sdk-rdsRDS SDK2.6.1
aliyun-python-sdk-kmsKMS SDK2.15.0
pydatahubDataHub SDKUnsupported
aliyun-mnsMNS SDK1.1.5
aliyun-python-sdk-cdnCDN SDK3.6.7
aliyun-python-sdk-ramRAM SDK3.2.0
aliyun-python-sdk-stsSTS SDK3.1.0
aliyun-python-sdk-iotIoT SDK8.30.0
aliyun-log-python-sdkSLS SDK0.7.3
wandWand0.6.7
opencvOpenCV4.5.4.58
numpyNumPy1.21.4
scipySciPy1.7.2
matplotlibMatplotlib3.4.3
scrapyScrapy2.5.1

Python 3.6

ModuleDescriptionVersion
oss2OSS SDK2.9.1
tablestoreTablestore SDK5.1.0
aliyun-fc2FC SDK2.3.0
aliyun-python-sdk-ecsECS SDK4.10.1
aliyun-python-sdk-vpcVPC SDK3.0.2
aliyun-python-sdk-rdsRDS SDK2.1.4
aliyun-python-sdk-kmsKMS SDK2.14.0
pydatahubDataHub SDK2.11.2
aliyun-mnsMNS SDK1.1.5
aliyun-python-sdk-cdnCDN SDK3.0.8
aliyun-python-sdk-ramRAM SDK3.0.0
aliyun-python-sdk-stsSTS SDK3.0.0
aliyun-python-sdk-iotIoT SDK7.8.0
aliyun-log-python-sdkSLS SDK0.6.38
wandWand0.6.7
opencvOpenCV3.3.0.10
numpyNumPy1.13.3
scipySciPy1.0.0
matplotlibMatplotlib2.0.2
scrapyScrapy1.4.0

References