Skip to content

Installation

Stéphane Derrode edited this page Jun 15, 2026 · 3 revisions

Installation

Requirements

  • Python 3.14+ — required: pyproject.toml sets requires-python = ">=3.14", so pip refuses to install on 3.13 or earlier
  • pip ≥ 24 (for PEP 660 editable installs)
  • A C/Fortran toolchain is not required: NumPy, SciPy and pandas ship as wheels for all major platforms.

Quick install (CPU only)

git clone https://github.com/SDerrode/exactIMM.git
cd exactIMM       # the Python package inside is called `exactIMM`

# Create and activate a project virtualenv (use python3.14 explicitly:
# a system python3 that is < 3.14 will be rejected by pip)
python3.14 -m venv .venv
source .venv/bin/activate     # Windows: .venv\Scripts\activate

# Editable install + dev tools (pytest)
pip install -e ".[dev]"

Note on macOS / homebrew users. Do not rely on the system NumPy: it can fail to load due to BLAS conflicts. Always work inside the project virtualenv created above.

Optional extras

Extra Installs When to use
gui PyQt6, matplotlib Interactive parameter exploration
paper matplotlib, statsmodels, scikit-learn, requests, yfinance Reproducing §6 and §7 experiments
dev pytest, pytest-cov, pytest-qt, mypy, ruff Running the test suite and static checks
pip install -e ".[gui]"           # GUI only
pip install -e ".[paper]"         # paper experiments
pip install -e ".[gui,paper,dev]" # everything

Verifying the install

# Run the test suite (≈ 45 s, 235 tests)
pytest

# Smoke-test the simulator
python -m prg.simulate --model model_gss_K2_q1_s1 -N 100 --seed 0 --no-save

# Smoke-test the filter
python -m prg.filter.main --model model_gss_K2_q1_s1 -N 100 --seed 0 --no-save

If pytest reports 235 passed and the two CLI calls finish without error, the install is good.

Updating

git pull
pip install -e ".[dev]" --upgrade

If a previous version of exactIMM.egg-info/ lingers and causes ModuleNotFoundError, just delete it: rm -rf exactIMM.egg-info and re-run pip install -e ".[dev]".

Common issues

Symptom Fix
ImportError: numpy.core.multiarray failed to import Activate the venv (source .venv/bin/activate)
Qt platform plugin "cocoa" could not be found (macOS GUI) pip install --upgrade --force-reinstall PyQt6
GUI launches but no plots show Check that matplotlib is installed inside the venv
pytest fails on test_semi_supervised only on Apple Silicon Known stochastic flakiness in the EM basin selection; simply re-run the suite (tests are seeded but occasionally sensitive on a single restart)

Clone this wiki locally