Install & Compatibility
Where this runs
tested against v? · pip install
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.920 runs
build_error
glibcpy 3.10–3.920 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
NetFS
✓ import NetFS
Framework classes, functions, and constants are available directly under the imported framework module.
This quickstart demonstrates how to import the `NetFS` framework and verify the availability of a representative class within it. PyObjC framework wrappers typically expose Objective-C classes, functions, and constants directly under the imported module. Detailed usage requires consulting Apple's official NetFS framework documentation.
import NetFS
from Foundation import NSObject
# The NetFS framework provides APIs for managing network file system mounts.
# To use specific classes, refer to Apple's NetFS documentation.
# For example, checking for a common class:
if hasattr(NetFS, 'NetFSMountSession'):
print('NetFSMountSession class is available.')
else:
print('NetFSMountSession class not found.')
# This example just demonstrates loading the framework and checking for a symbol.
# Real-world usage would involve creating instances and calling methods.
# For example, to instantiate a dummy NSObject (part of Foundation, often used with Cocoa):
obj = NSObject.alloc().init()
print(f'Created an NSObject: {obj}')
Debug
Known issues
breakingPython 3.9 support was dropped with PyObjC 12.0. Python 3.8 support was dropped with PyObjC 11.0. Ensure your Python environment is 3.10 or newer.fixUpgrade your Python interpreter to version 3.10 or newer.
affects: 11.0, 12.0 and later
breakingPyObjC 11.1 introduced significant changes in how it models Objective-C initializer methods (methods in the 'init' family) to align with `clang`'s Automatic Reference Counting (ARC) documentation. These methods now correctly steal a reference to `self` and return a new one.fixReview code that interacts with Objective-C initializer methods, particularly custom Python subclasses, to ensure correct reference handling, especially if upgrading from pre-11.1 versions.
affects: 11.1 and later
gotchaPyObjC 10.3 temporarily broke the ability to use `__init__` in Python classes that subclass Objective-C classes (when `__new__` was not user-implemented). While 10.3.1 partially restored this for classes with user-implemented `__new__`, code relying on PyObjC's provided `__new__` still cannot use `__init__` for initialization.fixIf encountering issues with `__init__` not being called, especially when subclassing Objective-C classes, consider implementing `__new__` in your Python class or using alternative initialization patterns compatible with PyObjC's object creation lifecycle.
affects: 10.3, 10.3.1 and later
gotchaPyObjC frequently updates its framework bindings for new macOS SDK versions. Building PyObjC from source or with specific extensions using an older SDK than the target macOS or the PyObjC release was built against can lead to compilation and runtime errors.fixAlways use the latest macOS SDK (usually with Xcode or Command Line Tools) when building PyObjC from source. If using pre-built wheels, ensure they are compatible with your macOS version and Python architecture.
affects: All versions
gotchaSubclassing Cocoa string classes (e.g., NSString) directly in Python with PyObjC is not supported and will result in crashes due to special handling of these types within the bridge.fixAvoid direct Python subclassing of Cocoa string classes. If you need string-like behavior, wrap the Cocoa string object or use standard Python strings.
affects: All versions
gotchaWhile PyObjC 11.0 introduced experimental support for free-threading (PEP 703) with Python 3.13, this is an advanced feature and earlier versions (e.g., 10.3) explicitly stated lack of support. Users experimenting with free-threading should be aware of potential instabilities or limitations.fixProceed with caution when using PyObjC in a free-threaded Python environment. Consult PyObjC documentation for the latest status and any specific guidelines for free-threading support.
affects: 10.3, 11.0 and later (Python 3.13+)
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredProvides the core bridge between Python and Objective-C, essential for all PyObjC framework wrappers.
pythonrequiredRequires Python version >=3.10.