Getting started

Scikit-Shapes is a pure Python package, but some of its dependencies are only available for Linux and macOS systems. If you are a Windows user, we advise you to use the official Windows Subsystem for Linux: it should run seamlessly.

Note

We welcome user feedback! If you run into issues with the installation process, please open an issue on our GitHub repository.

Using pip

Scikit-Shapes is available on PyPI as the skshapes package. You can install the latest release with:

pip install skshapes

Note

The most likely source of installation problems is the KeOps dependency. You may also want to install PyTorch using a specific command, especially if you do not have a GPU.

Warning

On Google Colab, you may run into conflicts between NumPy 1.x and 2.x. To avoid this, use:

!pip uninstall -y numpy
!pip install skshapes

From source

To install Scikit-Shapes from source, start by cloning the GitHub repository. Then, on a terminal, navigate to the directory and run

pip install .

From source (developer mode)

To install Scikit-Shapes with the development environment, start by cloning the GitHub repository. Then, on a terminal, navigate to the directory and run

pip install --editable .
pip install -r requirements_dev.txt

The --editable option links the package in site-package to the source code in the current working directory. Then, any local change to the source code reflects directly in the environment.

The development environment contains tools for linting, syntax checking and testing. Linting and syntax tests can be run by executing the command:

pre-commit run --all-files

You can run tests with:

pytest

This creates a coverage report in htmlcov/, that you can open in a web browser using:

firefox htmlcov/index.html

You can also install the necessary tools to build the documentation with:

pip install -r requirements_docs.txt

And render this website with:

cd doc/source
make clean
make html

To serve it locally:

cd doc/_build/html
python -m http.server