Advanced installation guide#

This page will guide you into installing ReservoirPy on your system.

Before any package installation, make sure that you have a compatible Python distribution already installed on your computer. ReservoirPy is meant to be used only with Python 3.9 and higher.

To check the version of your Python distribution, you can run the following command in a terminal, in Linux/MacOS/Windows :

python --version

When performing the installation of ReservoirPy and all its dependencies, we also recommend using a virtual environment to avoid any unintended interactions with the dependencies that are already installed on your system. To learn more about virtual environment, you can check Python documentation on virtual environments and packages, or the documentation of the conda environment manager if you are using Anaconda.

Installation using pip#

ReservoirPy package is hosted by Pypi and can therefore be installed using pip on Linux/MacOS/Windows (in the latter case, having an Anaconda distribution installed on your computer may be necessary).

To install ReservoirPy using pip, simply run the following command in a terminal:

pip install reservoirpy

To check your installation of ReservoirPy, run one of the following:

pip show reservoirpy
python -c "from reservoirpy import __version__; print(__version__)"

Installation using the source code#

You can find the source code of ReservoirPy on GitHub (https://github.com/reservoirpy/reservoirpy).

Download the latest version on the master branch, or any other branch you would like to install (dev branch or older versions branches). You can also fork the project from GitHub.

Then, unzip the project (or clone the forked repository). You can then install ReservoirPy in editable mode using pip :

pip install -e /path/to/reservoirpy

Additional dependencies and requirements#

Some ReservoirPy submodules uses specific libraries. Since we want ReservoirPy to keep its core features as simple as possible, those libraries are not included in the default install process. However, you can install of the additional dependencies by running:

pip install "reservoirpy[all]"

For a more fine-grained control of your environmnent, you can only install the optional dependencies you need:

Hyperoptimization and visualization tools

All basic dependencies of ReservoirPy should be installed when using pip as package manager.

Although, to use the hyperoptimization and visualization tools from the reservoirpy.hyper module, you will need to install a few more dependencies in your virtual environment, namely hyperopt, matplotlib and seaborn. You can do so using the hyper extra dependencies:

pip install "reservoirpy[hyper]"

ScikitLearnNode

You can use some of scikit-learn’s linear models through the use of the the ScikitLearnNode. While even the ScikitLearnNode does not require scikit-learn to be installed since it is never imported, this installation ensures that the correct model API version is used

In the same manner, you can install scikit-learn with the appropriate version using:

pip install "reservoirpy[sklearn]"

Jax

If you want to use the reservoirpy.jax submodule:

pip install "reservoirpy[jax]"

Development tools

ReservoirPy use pytest as test framework, and flake8 as linter. If you want to contribute to ReservoirPy, you should have the following additional dependencies installed:

pip install pytest pytest-cov flake8

All dependencies

A summary of all dependencies and their purpose in ReservoirPy can be found in the table below:

All dependencies#

Dependency

Version

Purpose

numpy

1.18.1

build, install

scipy

1.4.1

build, install

joblib

1.3.0

build, install

hyperopt

0.2.5

reservoirpy.hyper, examples

matplotlib

3.3.3

reservoirpy.hyper, examples

tqdm

4.43.0

reservoirpy.hyper, docs

pytest

6.1.2

tests

pytest-cov

2.10.1

tests

scikit-learn

0.24.1

reservoirpy.nodes.ScikitLearnNode, tests

jax

0.4.38

reservoirpy.jax, tests

sphinx

7.2.6

docs

pydata-sphinx-theme

0.13.3

docs

sphinx-copybutton

0.5.2

docs

ipython

7.31.1

docs

nbsphinx

0.8.7

docs

sphinx-design

0.5.0

docs