Last modified: Jun 16, 2026
Install Feast Feature Store in Python
Feast is an open-source feature store for machine learning. It helps you manage, serve, and share features across models. Installing Feast in Python is straightforward. This guide walks you through each step.
We will cover prerequisites, installation methods, and a basic setup example. By the end, you will have Feast running locally. Let's begin.
What You Need Before Installing
Feast requires Python 3.8 or higher. It also needs pip, the Python package manager. Ensure you have a virtual environment ready. This keeps dependencies isolated.
Check your Python version with this command:
python --version
If Python is not installed, download it from python.org. Use a virtual environment like venv or conda. Create one with:
python -m venv feast-env
source feast-env/bin/activate # On Windows: feast-env\Scripts\activate
Install Feast Core Package
The main Feast package is feast. Install it via pip. Open your terminal and run:
pip install feast
This installs Feast with default dependencies. It includes support for offline and online stores. The process takes a few minutes. You should see output like:
Successfully installed feast-0.36.0 ...
If you need specific storage backends, install extras. For example, use PostgreSQL with:
pip install 'feast[postgres]'
Other options include feast[redis] or feast[snowflake]. Check the Feast documentation for all extras.
Verify the Installation
After installing, verify Feast works. Run this Python code:
import feast
print(feast.__version__)
Expected output shows the version number:
0.36.0
If you see an error, check your Python environment. Ensure you are in the correct virtual environment.
Set Up a Basic Feast Project
Now create a simple Feast project. Use the feast init command. This generates a default configuration.
feast init my_feast_project
cd my_feast_project
This creates a folder structure with feature_store.yaml and example_repo.py. The YAML file defines store configurations. The Python file defines feature definitions.
Open feature_store.yaml. It looks like this:
project: my_feast_project
registry: data/registry.db
provider: local
online_store:
type: sqlite
path: data/online.db
offline_store:
type: file
This uses local SQLite for online storage and file-based offline storage. Perfect for testing.
Add a Feature View
Edit example_repo.py to define a feature view. We'll create a simple example with driver data. Replace its contents with:
from datetime import timedelta
from feast import FeatureView, Field
from feast.types import Float32, Int32
from feast.infra.offline_stores.file_source import FileSource
# Define a data source
driver_hourly_stats = FileSource(
path="/path/to/driver_stats.parquet", # Replace with actual file
timestamp_field="event_timestamp",
created_timestamp_column="created",
)
# Define a feature view
driver_fv = FeatureView(
name="driver_hourly_stats",
entities=["driver_id"],
ttl=timedelta(hours=2),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int32),
],
online=True,
source=driver_hourly_stats,
)
This code defines a feature view for driver statistics. It expects a Parquet file. For now, we can skip the data file and just test the setup.
Apply the Configuration
Run the feast apply command. This registers features in the registry.
feast apply
Output shows success messages:
Created entity driver_id
Created feature view driver_hourly_stats
Created feature service driver_hourly_stats_service
Test with Python Code
Now test fetching features. Use the Feast Python SDK. Create a file test_feast.py:
from feast import FeatureStore
# Initialize the store
store = FeatureStore(repo_path=".")
# Retrieve online features
features = store.get_online_features(
features=[
"driver_hourly_stats:conv_rate",
"driver_hourly_stats:acc_rate",
],
entity_rows=[{"driver_id": 1001}],
).to_dict()
print(features)
Run it:
python test_feast.py
If no data exists, you may see empty values. For a full test, ingest sample data first.
Ingest Sample Data
Generate sample data using a script. Add this to example_repo.py or a separate file:
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
# Create sample data
rows = 100
data = pd.DataFrame({
"driver_id": [1001 + i for i in range(rows)],
"conv_rate": np.random.uniform(0.1, 0.9, rows),
"acc_rate": np.random.uniform(0.8, 1.0, rows),
"avg_daily_trips": np.random.randint(10, 50, rows),
"event_timestamp": [datetime.now() - timedelta(hours=i) for i in range(rows)],
"created": datetime.now(),
})
# Save as Parquet
data.to_parquet("driver_stats.parquet")
Run this script. Then apply Feast again:
feast apply
Now the online store has data. Rerun test_feast.py. Output should show values:
{'driver_id': [1001], 'conv_rate': [0.45], 'acc_rate': [0.92]}
Common Installation Issues
Some users face problems. Here are fixes:
Error: No module named 'feast' - This means Feast is not installed. Check your virtual environment. Run pip list | grep feast. If empty, reinstall.
Error: Protobuf version conflict - Feast requires specific protobuf versions. Upgrade or downgrade with pip install protobuf==3.20.3.
Error: SQLite not available - On some systems, SQLite may be missing. Install it via your package manager. For Ubuntu: sudo apt install sqlite3.
Best Practices for Production
For production, use a remote registry. Options include GCS, S3, or PostgreSQL. Update feature_store.yaml accordingly. Also use a robust online store like Redis.
Version your features. Feast supports multiple projects. Use meaningful names for features and entities.
Monitor feature freshness. Set appropriate TTL values. This prevents stale data from serving.
Conclusion
Installing Feast Feature Store in Python is simple. Start with pip install feast. Initialize a project with feast init. Define features and apply them. Test with Python code. This setup works for local development.
For production, scale with cloud storage. Feast integrates well with Kubernetes and cloud services. Master these basics first. Then explore advanced features like feature retrieval and serving.
Now you have a working Feast installation. Build your feature pipelines. Serve features to models efficiently. Happy MLOps!