pyobjc-framework-virtualization provides Python wrappers for Apple's Virtualization framework on macOS. It is part of the PyObjC project, a bidirectional bridge enabling Python scripts to interact with Objective-C libraries, including macOS Cocoa frameworks. The current version is 12.1, and it maintains an active release cadence, typically aligning with macOS SDK updates and Python version support.
pip install pyobjc-framework-virtualizationVerified import paths — ran on the pinned version, not inferred.
This quickstart checks if the macOS Virtualization framework is supported on the current machine. This is the simplest interaction with the framework without requiring complex setup or specific entitlements. Actual virtual machine creation and execution involve more extensive configuration and may require specific macOS entitlements.
Upgrade your Python environment to Python 3.10 or later for PyObjC 12.x. Always check `requires_python` on PyPI or the PyObjC changelog for specific version requirements.
Review code that interacts with object initialization, especially custom subclasses or factory methods, to ensure correct reference handling. Explicit memory management is rarely needed in Python, but understanding the underlying Objective-C semantics is crucial for correct behavior.
Ensure your macOS application (or a development sandbox configuration) includes the `com.apple.security.virtualization` entitlement to fully utilize the Virtualization framework. This is usually configured in Xcode for native applications.
If encountering issues with custom `__new__` and `__init__` behavior, upgrade to PyObjC 10.3.1 or later.
Ensure your development and deployment environment is macOS to use this library.