Skip to content

Installation

SpinForge supports Python 3.11 and later.

Page contract

  • Starting point: You have Python 3.11 or later and can run commands in a terminal.
  • Destination: SpinForge imports successfully and you are ready to run an example.
  • Next: Follow Your first structure.
  • Skip: The source and documentation sections if you only need the released Python package.

From PyPI

Create an isolated environment, then install the package:

uv venv
uv pip install spinforge
python -m venv .venv
source .venv/bin/activate
python -m pip install spinforge

Confirm that the installation is importable:

python -c "import spinforge; print('SpinForge is ready')"

Continue with Your first structure.

From a source checkout

Contributors need uv and just:

git clone https://github.com/spglib/spinforge.git
cd spinforge
uv sync --dev
uv run prek install

Run the tests and repository checks before opening a pull request:

just test
just prek

Build the documentation locally

The development environment includes Zensical and mkdocstrings:

just docs

This starts a local preview server with live reload. Use just docs-build to run the same strict production build used by GitHub Pages.