Install & Compatibility
Where this runs
tested against v0.33.0 · 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 1.962s · 36.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.4s · import 1.736s · 37MB
36MB installed
● package 36MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
VpcV1
✓ from ibm_vpc import VpcV1
✗ from ibm_vpc.vpc_v1 import VpcV1
Old pattern moved to top-level import in v0.28.0
IamAuthenticator
✓ from ibm_cloud_sdk_core.authenticators import IamAuthenticator
✗ from ibm_vpc import IamAuthenticator
Authenticators are in ibm-cloud-sdk-core, not ibm-vpc
Initialize VPC client with IAM API key and create a VPC.
import os
from ibm_vpc import VpcV1
from ibm_cloud_sdk_core.authenticators import IamAuthenticator
authenticator = IamAuthenticator(
apikey=os.environ.get('IBM_CLOUD_API_KEY', '')
)
service = VpcV1(authenticator=authenticator)
service.set_service_url('https://us-south.iaas.cloud.ibm.com/v1')
vpc_prototype = {
'name': 'my-vpc',
'resource_group': {'id': 'your-resource-group-id'}
}
response = service.create_vpc(vpc_prototype)
print(response.get_result())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ibm_vpc'
Package not installed or installed with wrong name.
fixRun 'pip install ibm-vpc' (hyphen, not underscore).
Unauthorized: Access denied (401)
Invalid API key or missing permissions.
fixVerify IBM_CLOUD_API_KEY is set correctly and has IAM access to VPC services.
AttributeError: module 'ibm_vpc' has no attribute 'VpcV1'
Incorrect import path after version changes.
fixUse 'from ibm_vpc import VpcV1' (top-level import).
ibm_cloud_sdk_core.api_exception.ApiException: Error: Resource not found (404)
Service URL or region is incorrect.
fixSet correct service URL for your region, e.g., service.set_service_url_for_region('us-south'). Upgrade
Version history
0.33.0latest on PyPI · released Apr 8, 2026
Audit
Dependencies
ibm-cloud-sdk-corerequiredCore SDK for authentication and HTTP