Install & Compatibility
Where this runs
tested against v0.1.111 · 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
py 3.9
✕ build_error
✕ build_error
102MB installed
● package 102MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
MorphCloudClient
✓ from morphcloud import MorphCloudClient
Correct import for the main client class.
morphcloud
✓ import morphcloud
Module-level import.
Initialize client, create a VM, run a command, then clean up.
from morphcloud import MorphCloudClient
import os
client = MorphCloudClient(api_key=os.environ.get('MORPH_API_KEY', ''))
# Create a VM
vm = client.vms.create(name='my-vm', image='ubuntu-22.04')
print(f"VM ID: {vm.id}")
# Start the VM
vm.start()
# Execute a command
result = vm.exec('echo hello')
print(result.stdout)
# Stop and destroy
vm.stop()
vm.destroy()
morphcloud --version
Errors
Common errors & fixes
morphcloud.exceptions.AuthenticationError: Invalid API key
API key not set or incorrect.
fixCheck that MORPH_API_KEY environment variable is set and valid.
morphcloud.exceptions.ResourceNotFoundError: VM with id '...' not found
VM ID does not exist or has been destroyed.
fixVerify the VM ID is correct. Use client.vms.list() to find active VMs.
Upgrade
Version history
0.1.111latest on PyPI · released Apr 6, 2026
Audit
Dependencies
No dependency data recorded yet.