Installation Guide

Install svy-sae for Small Area Estimation in Python with pip or uv, set up a project for the tutorials, and pre-compile the model kernels.
Author

Mamadou S. Diallo, Ph.D.

Modified

August 29, 2026

Keywords

install svy-sae, pip install small area estimation, uv Python project setup

Default setup

To use svy-sae, you first need to install it. You can install svy-sae from PyPI using pip:

pip install svy-sae

The svy-sae package depends on svy for survey design specification and direct estimation. This dependency is installed automatically.

We recommend using a virtual environment to install svy-sae. You can create one with:

python -m venv venv

You may replace venv with any name you prefer, such as .venv or svy_sae_env. Activate the virtual environment with:

source venv/bin/activate

Optional: pre-compile the kernels

Model kernels compile on first use and are cached to disk, so only the very first fit of a given data shape on a machine pays compilation — a few extra seconds. To pay that cost up front instead (before a workshop, a demo, or a production window), warm the cache once after installing:

import svy_sae

svy_sae.warmup()

Passing your own dataset warms the exact shapes your later fits will use — see the warmup documentation for details.


Next steps

Next, take a quick tour of the svy-sae workflow and package structure:

Quick Tour