Install & Compatibility
Where this runs
tested against v0.9.3 · 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.920 runs
build_error
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 31.7s · import 0.000s · 635MB
683MB installed
● package 683MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PackageNotFoundError
✓ from matminer import PackageNotFoundError
✗ from matminer.datasets.dataframe_loader import load_elastic_debye
version
✓ from matminer import version
✗ from matminer.datasets.dataframe_loader import load_elastic_debye
This quickstart demonstrates how to load a dataset from matminer, convert string representations of structures into pymatgen Structure objects, and apply a composition-based featurizer to enrich the DataFrame with new material properties.
import pandas as pd
from matminer.datasets.dataframe_loader import load_elastic_debye
from matminer.featurizers.conversions import StrToStructure
from matminer.featurizers.composition import ElementProperty
# 1. Load a sample dataset
df = load_elastic_debye()
print(f"Initial DataFrame shape: {df.shape}")
print(df.head())
# 2. Convert 'structure' string representation to pymatgen Structure objects
# Note: This step is crucial for structure-based featurizers
str_to_structure = StrToStructure()
df = str_to_structure.featurize_dataframe(df, 'structure')
# 3. Apply a composition featurizer
# (ElementProperty calculates statistics of elemental properties for each composition)
ep_featurizer = ElementProperty(
features=['atomic_radius', 'electronegativity'],
stats=['mean', 'std_dev']
)
df = ep_featurizer.featurize_dataframe(df, 'composition', ignore_errors=True)
print(f"\nDataFrame after featurization shape: {df.shape}")
print(df[['formula', 'composition', 'ElementProperty mean atomic_radius', 'ElementProperty std_dev electronegativity']].head())
matminer --version
Debug
Known issues
breakingIn `matminer v0.10.0`, the `impute_nan` parameter for many featurizers changed its default value from `False` to `True`. This means missing features (NaNs) will now be automatically imputed as the mean of the column by default, potentially altering previous model training behaviors if not explicitly set to `False`.fixIf you require the old behavior (no imputation by default), explicitly set `impute_nan=False` when initializing your featurizers, e.g., `MyFeaturizer(impute_nan=False)`.
affects: >=0.10.0
gotchaMatminer has strict dependency requirements, particularly for `pandas`, `numpy`, and `pymatgen`. Incompatibilities can arise with newer versions of these upstream libraries, leading to import errors or unexpected behavior. This was particularly noted around `pandas v2` and specific `pymatgen` versions.fixIf encountering dependency issues, consider installing matminer in a fresh environment. Refer to the `requirements/*.txt` files on the GitHub repository for pinned dependency versions known to be compatible with your matminer version. Always check release notes for specific compatibility updates.
affects: All versions, but particularly relevant for v0.9.x to v0.10.x
gotchaWhen using `BaseFeaturizer.set_n_jobs()` for parallel processing, especially with large datasets, there is a risk of Out-of-Memory (OOM) errors. This is due to Python's multiprocessing overhead and potential data duplication across processes if not managed carefully (e.g., with a Dask client).fixFor very large datasets, avoid setting `n_jobs` to a high number directly. Consider processing in chunks, using a Dask client for more robust distributed computing, or setting `n_jobs=1` to run in a single process if memory is a constraint.
affects: All versions using multiprocessing, noted in >=0.9.0
deprecatedIn `matminer v0.10.0`, the `ChemEnvSiteFingerprint.from_preset()` method had some 'not-implemented' Chemical Environments (CEs) removed. While these were technically non-functional, their removal might affect code that expected a specific set of presets or relied on the method's previous behavior.fixReview your usage of `ChemEnvSiteFingerprint.from_preset()`. Ensure that the specific Chemical Environments you intend to use are still available. If you were using any of the removed 'not-implemented' CEs, adapt your code to use the currently supported ones or implement custom CEs if needed.
affects: >=0.10.0
Upgrade
Version history
0.10.1latest on PyPI · released Apr 14, 2026
Audit
Dependencies
pymatgenrequiredCore dependency for representing materials structures and compositions.
pandasrequiredUsed extensively for data manipulation, particularly DataFrames.
numpyrequiredFundamental library for numerical operations.