Installation

Requirements

  • Python >=3.9,<3.14
  • PyTorch >=2.2.2
  • NumPy >=1.23

Install from the private package index

If you need a specific PyTorch build, install that first. Otherwise lls can resolve its public dependencies from PyPI.

pip install torch

Then install lls:

pip install --extra-index-url https://pypi.salodev.no/simple/ lls

With uv:

uv add lls --index salodev=https://pypi.salodev.no/simple/

On older Intel macOS systems, use the compatibility extra:

pip install --extra-index-url https://pypi.salodev.no/simple/ "lls[mac-intel]"

With uv:

uv add "lls[mac-intel]" --index salodev=https://pypi.salodev.no/simple/

Do not use uv add lls --index-url ... for this setup. That replaces PyPI as the default index, which breaks resolution for public dependencies like numpy unless your private index is also a PyPI mirror.

Install from source

git clone git@github.com:c-salomonsen/LLS.git
cd LLS
uv sync

If you prefer pip:

python -m venv .venv
source .venv/bin/activate
pip install -e .

Verify the install

python -c "from lls import fit_compartment_model, lls_3k, lls_4k_vB; print('ok')"

The core package should import without simulation dependencies:

python -c "import lls; print('ok')"

Optional simulation and benchmarking dependencies

If you want the simulation and parquet-based validation utilities from the packaged library:

pip install --extra-index-url https://pypi.salodev.no/simple/ "lls[sim]"

With uv:

uv add "lls[sim]" --index salodev=https://pypi.salodev.no/simple/

Contributor dependency groups

  • uv sync --group dev installs test, docs, notebook, and plotting tooling for working in this repository.
  • uv sync --group analysis installs the simulation and parquet stack used by the validation scripts in this repository.

Preview the docs locally

uv sync --group dev
uv run mkdocs serve

Build the static site with strict link checking:

uv run mkdocs build --strict

After installation, most users should continue with Use your own TAC, AIF, and time data.