ModuleNotFoundError: No module named 'fastparquet'
Third-person routing text. Fixes pandas parquet IO failing with No module named fastparquet: the engine is not installed. pip install fastparquet (pyarrow also works). Use when an agent hits this on read_parquet. Not for other missing engines.
TL;DR: pandas needs a parquet engine and fastparquet is the one your code asked for. Run pip install fastparquet (pyarrow works too) and the read succeeds.
The error
ModuleNotFoundError: No module named 'fastparquet'Fix it
- Install an engine:
pip install fastparquetExpected: install completes.
- Verify:
import pandas as pd
df = pd.read_parquet("data.parquet", engine="fastparquet")
print(df.head())Expected: prints the first rows.
- Alternative engine:
pip install pyarrowand omit the engine argument.
When this applies
Use this when readparquet or toparquet raises the fastparquet error.
When it does not apply
If the error is the missing-pyarrow message, install pyarrow instead. If an engine is installed but the file will not read, the file may be corrupt.
Compatibility
All pandas versions with parquet support.
Root cause
pandas delegates parquet to an external engine and ships with none selected by default. Code (or pandas' own engine preference) asking for fastparquet fails when it was never installed.
Edge cases
pyarrow is the recommended engine for new code; fastparquet stays useful for older files. In notebooks, restart the kernel after installing so the new package is visible.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.