Installation

The recommended way to install the unitpackage is to use your package manager, (e.g., apt-get on Debian or Ubuntu, pacman on Arch Linux, brew on macOS.)

You can consult repology to see if the unitpackage is available for your package manager.

Alternatively, the unitpackage can be installed by one of the following approaches.

Install with pip from PyPI

The latest stable version of the unitpackage is available on PyPI for all platforms and can be installed if you have Python and pip installed already:

pip install unitpackage

This command downloads and installs the unitpackage and its dependencies into your local Python installation.

If the above command fails because you do not have permission to modify your Python installation, you can install the unitpackage into your user account:

pip install --user unitpackage

You can instead also install the latest unreleased version of the unitpackage from our GitHub Repository with

pip install git+https://github.com/echemdb/unitpackage@main

Install with conda from conda-forge

The unitpackage is available on conda-forge for all platforms.

If you don’t have conda yet, we recommend to install Miniforge.

Miniforge is already pre-configured for conda-forge. If you already had another release of conda installed, make sure the conda-forge channel is configured correctly

Once your conda setup is ready, create a new unitpackage environment with the latest stable version of the unitpackage:

conda create -n unitpackage unitpackage

To use the unitpackage, activate the unitpackage environment:

conda activate unitpackage

To install the unitpackage into an existing environment, activate that environment and then

conda install unitpackage

Install with pixi for development

We recommend pixi for developers of unitpackage to use a curated list of dependencies that are tested to work on all platforms. These are also exactly the dependencies that are used in our CI, which makes it easier to test things locally.

Once you installed pixi itself, get a copy of the latest unitpackage

git clone https://github.com/echemdb/unitpackage.git

Once you made some changes, you can run the test suite with

pixi run test

or run the linters

pixi run lint

or rebuild the documentation

pixi run doc

You can also explore unitpackage in an interactive session by launching an IPython session

pixi run -e dev ipython

or a Jupyter notebook

pixi run -e dev jupyter lab

Note that any changes you make to the files in your local copy of unitpackage should be immediately available when you restart your Python kernel.

We would love to see your contribution to unitpackage.