Skip to content

Installation#

Installing a user environment#

Not published yet

math-spec is on the alpha stream and the publish job is off until it leaves it — see RELEASING.md. The commands below are what the first release will look like; until then, install from a checkout or a git reference.

Hint

If it is your first time using Python, we recommend pixi, conda, or uv as easy-to-use package managers. They are available for Windows, macOS, and GNU/Linux. It is always helpful to use dedicated environments.

You can install math-spec via all common package managers:

pixi add --pypi math_spec
uv add math_spec
conda create -n math-spec "python>=3.12" "pip"
conda activate math-spec
pip install math_spec
pip install math_spec

math-spec is written and tested to be compatible with Python 3.12 and above. We recommend to use the latest version with active support (see endoflife.date).

Installing a development environment#

The install instructions are slightly different to create a development environment compared to a user environment:

git clone https://github.com/energy-models/math-spec
cd math-spec

pixi run pre-commit-install
pixi run test

For more detailed installation instructions specific to developing the math-spec codebase, see our development documentation.