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

Python runtime environments

Function Compute supports the following Python runtime environments.

Version OS Architecture
Python 3.9 (Python 3.9) Linux x86_64
Python 3 (Python 3.6) Linux x86_64
Notice The Python 2.7 runtime environment is no longer supported in Function Compute.
  • Before June 30, 2022, you can create and update functions whose runtime environment is Python 2.7. However, Function Compute no longer provides feature updates including security patches on the Python 2.7 runtime environment.
  • From July 1, 2022, you cannot create functions whose runtime environment is Python 2.7. However, you can still update the existing functions whose runtime environment is Python 2.7.
  • From October 1, 2022, you cannot update existing functions whose runtime environment is Python 2.7. However, you can still run functions whose runtime environment is Python 2.7.

Built-in Python modules

In addition to standard Python modules, the Python runtime environments in Function Compute provide common built-in modules. The following table describes the available modules.

Python 3.9 (Python 3.9)

Module Description Version
oss2 OSS SDK 2.15.0
tablestore Tablestore SDK 5.2.1
aliyun-fc2 FC SDK 2.5.0
aliyun-python-sdk-ecs ECS SDK 4.24.11
aliyun-python-sdk-vpc VPC SDK 3.0.15
aliyun-python-sdk-rds RDS SDK 2.6.1
aliyun-python-sdk-kms KMS SDK 2.15.0
pydatahub DataHub SDK None
aliyun-mns MNS SDK 1.1.5
aliyun-python-sdk-cdn CDN SDK 3.6.7
aliyun-python-sdk-ram RAM SDK 3.2.0
aliyun-python-sdk-sts STS SDK 3.1.0
aliyun-python-sdk-iot IoT SDK 8.30.0
aliyun-log-python-sdk SLS SDK 0.7.3
wand Image processing library 0.6.7
opencv OpenCV 4.5.4.58
numpy NumPy 1.21.4
scipy SciPy 1.7.2
matplotlib Matplotlib 3.4.3
scrapy Scrapy 2.5.1

Python 3 (Python 3.6)

Module Description Version
oss2 OSS SDK 2.9.1
tablestore Tablestore SDK 5.1.0
aliyun-fc2 FC SDK 2.3.0
aliyun-python-sdk-ecs ECS SDK 4.10.1
aliyun-python-sdk-vpc VPC SDK 3.0.2
aliyun-python-sdk-rds RDS SDK 2.1.4
aliyun-python-sdk-kms KMS SDK 2.14.0
pydatahub DataHub SDK 2.11.2
aliyun-mns MNS SDK 1.1.5
aliyun-python-sdk-cdn CDN SDK 3.0.8
aliyun-python-sdk-ram RAM SDK 3.0.0
aliyun-python-sdk-sts STS SDK 3.0.0
aliyun-python-sdk-iot IoT SDK 7.8.0
aliyun-log-python-sdk SLS SDK 0.6.38
wand Image processing library 0.6.7
opencv OpenCV 3.3.0.10
numpy NumPy 1.13.3
scipy SciPy 1.0.0
matplotlib Matplotlib 2.0.2
scrapy Scrapy 1.4.0

References