Install & Compatibility
Where this runs
tested against v3.0.48 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.298s · 43.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.2s · import 0.282s · 44MB
42MB installed
● package 42MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
VpcRequest
✓ from aliyunsdkvpc.request.v20160428.CreateVpcRequest import CreateVpcRequest
✗ from aliyunsdkvpc.request.v20160428 import CreateVpcRequest
Import must explicitly reference the class from the module, not just the module.
Creates a VPC in cn-hangzhou region. Requires Alibaba Cloud credentials set in environment variables.
from aliyunsdkcore.client import AcsClient
from aliyunsdkvpc.request.v20160428.CreateVpcRequest import CreateVpcRequest
import os
client = AcsClient(
os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', ''),
os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', ''),
'cn-hangzhou'
)
request = CreateVpcRequest()
request.set_VpcName('my-vpc')
request.set_CidrBlock('10.0.0.0/16')
response = client.do_action_with_exception(request)
print(response.decode('utf-8'))
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aliyunsdkvpc'
The package is not installed or the import path is incorrect.
fixInstall: pip install aliyun-python-sdk-vpc. Then import from aliyunsdkvpc.
AttributeError: module 'aliyunsdkvpc.request' has no attribute 'v20160428'
Trying to import from the package without specifying the correct submodule path.
fixUse the full import: from aliyunsdkvpc.request.v20160428.CreateVpcRequest import CreateVpcRequest
Upgrade
Version history
3.0.48latest on PyPI · released Feb 4, 2026
Audit
Dependencies
aliyun-python-sdk-core-v3requiredRequired for authentication and HTTP transport