Install & Compatibility
Where this runs
tested against v0.4.2 · 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
326MB installed
● package 326MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
load_from_mat
✓ from matio import load_from_mat
✗ from matio import MatFileReader
save_to_mat
✓ from matio import save_to_mat
whosmat
✓ from matio import whosmat
Load a .mat file and print variable names.
from matio import MatFileReader
import os
filename = 'example.mat'
if os.path.exists(filename):
reader = MatFileReader(filename)
data = reader.read()
print(data.keys())
else:
print('File not found.')
Debug
Known issues
breakingPython >=3.11 required; no support for older Python versions.fixUpgrade Python to 3.11 or later.
affects: <0.5.0 or Python<3.11
gotchaMATLAB string arrays containing NaN are not supported in write operations (v0.5.2+).fixUse missing strings or convert NaN to empty strings before saving.
affects: >=0.5.2
deprecatedThe old scipy.io.loadmat is not a drop-in replacement; mat-io has different API and handles newer MATLAB types.fixUse mat-io's MatFileReader for proper table/string support.
affects: all
Upgrade
Version history
1.0.0latest on PyPI · released May 17, 2026
Audit
Dependencies
numpyrequiredRequired for array data handling
h5pyoptionalRequired for v7.3 HDF5-based files