Skip to content

01. Getting Started

Nao Yamamoto edited this page Feb 17, 2026 · 3 revisions

This guide walks you through setting up a clean Python environment and running the MIGHTI simulation platform.


Step 1: Clone the MIGHTI Repository

Open a terminal and run:

cd ~/Documents  # or any preferred folder
git clone https://github.com/starsimhub/mighti.git
cd mighti

Step 2: Create and Activate a Conda Environment

Create a dedicated environment for MIGHTI:

conda create --name mighti python=3.11 -y
conda activate mighti

Tip: It's recommended to create a separate Conda environment (or venv) for each repository. This ensures clean isolation of dependencies across different modeling projects.


Step 3: Install Pinned Dependencies (Reproducible Setup)

For a fully reproducible environment:

pip install -r requirements.txt
pip install -e .

This installs MIGHTI in editable mode so that local code changes take effect immediately.

If you encounter:

TypeError: argsort() got an unexpected keyword argument 'stable'

Fix with:

pip install -U "numpy>=2.0.0"

Step 4: Verify Installation (Optional)

Check core versions:

python -c "import starsim, stisim, numpy; print('Starsim:', starsim.__version__, '| STIsim:', stisim.__version__, '| NumPy:', numpy.__version__)"

Ensure:

  • Starsim 3.0.x
  • STIsim 1.4.0
  • NumPy ≥ 2.0

Step 5: Run a Test Simulation

From the project root folder:

python mighti_main.py

This runs a sample simulation including:

  • Demography
  • HIV
  • Selected NCD modules

A quick-check plot is saved to the outputs/ folder.

Note: mighti_main.py is an example driver script and not part of the stable public API.

Clone this wiki locally