--- id: coremltools version: "9.0" license: BSD license_treatment: permissive maintenance: active --- # coremltools — Community Tools for Core ML License: permissive · Maintenance: active · Downloads: 1.9M/mo ## What it is and what it does coremltools is a Python package for working with Apple's Core ML format (.mlmodel), the standard for machine learning models on iOS, iPadOS, watchOS, macOS, and tvOS. It lets you convert trained models from popular ML frameworks into Core ML format, write models directly to .mlmodel using a simple API, and verify conversions by making predictions through the Core ML framework on supported platforms. The package depends on numpy, protobuf, sympy, tqdm, packaging, attrs, cattrs, and pyaml to handle model serialization, computation, and data transformation. It is actively maintained, supports Python 3.7–3.13, and has pre-built wheels for macOS and Linux, making installation straightforward on most development machines. Core ML models can then be directly integrated into Xcode projects for deployment on Apple devices. Use it for: - Convert a trained TensorFlow or PyTorch model to Core ML format for deployment in an iOS app. - Export a scikit-learn decision tree or random forest to .mlmodel for use in a macOS application. - Examine and validate a Core ML model's structure and metadata before shipping it to production. - Test model predictions on macOS or iOS using the Core ML framework to verify conversion accuracy. - Build a pipeline to automatically convert and package ML models for distribution via Xcode. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts trained machine learning models from popular frameworks into Apple's Core ML format (.mlmodel) and provides tools to examine, test, and make predictions with Core ML models. Yes, if you are developing machine learning features for Apple platforms (iOS, macOS, watchOS, tvOS). coremltools is the standard tool for converting models to Core ML format and is actively maintained with no known vulnerabilities. Install friction is moderate due to multiple dependencies, but pre-built wheels are available for common platforms. Not relevant if you are not targeting Apple devices. ## Install pip install coremltools uv add coremltools poetry add coremltools ## Installing coremltools Before you install: Medium install friction: pre-built wheels available for Python 3.7–3.13 on macOS (x86_64 and arm64) and Linux (x86_64), but 8 runtime dependencies (numpy, protobuf, sympy, tqdm, packaging, attrs, cattrs, pyaml) may require compilation or system libraries on some platforms. Active maintenance with recent commits. License in practice: BSD 3-Clause license (permissive): you can use, modify, and distribute coremltools freely in commercial and open-source projects, provided you include the license notice and disclaimer. Quickstart: pip install coremltools import coremltools # Convert a model (e.g., from a trained framework) to Core ML format ml_model = coremltools.converters.convert(trained_model) ml_model.save('model.mlmodel') Conversion and prediction features require a trained model from a supported framework (e.g., TensorFlow, PyTorch, scikit-learn); prediction on Core ML models requires macOS, iOS, or compatible Apple platform. Verify before relying: - Which machine learning frameworks are supported for conversion (e.g., TensorFlow, PyTorch, scikit-learn, XGBoost). - Whether prediction functionality works on Linux or only on Apple platforms. - Specific version constraints or compatibility notes for numpy, protobuf, or other runtime dependencies. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags convert models to core ml format, machine learning model conversion, core ml model tools, mlmodel file creation, ml model export apple, neural network to core ml, tree ensemble conversion, model-conversion, apple-ml, core-ml [View on SkillFed](https://skillfed.io/packages/coremltools) · [View on PyPI](https://pypi.org/project/coremltools/)