Installation from Sources#
This guide is intended for users who want to test experimental features or contribute to MOABB’s development. If you only need the stable release, please refer to our pip installation guide.
Note
For a straightforward MOABB installation (without development), please see the pip installation guide.
Prerequisites#
Before proceeding, ensure that you have the following:
A working installation of Python.
Pip installed on your system (see the pip installation guide).
Cloning the Repository#
First, clone the MOABB repository from GitHub and navigate into the project directory:
git clone https://github.com/neurotechx/moabb.git
cd moabb
Installing MOABB from the Source#
If you wish to install MOABB for usage without modifying the code, use one of the following methods:
Install the Latest Development Version (from GitHub):
pip install https://github.com/NeuroTechX/moabb/archive/refs/heads/develop.zip
Install from a Local Clone:
pip install .
Editable Installation:
This mode installs MOABB so that any local changes are immediately available:
pip install -e .
Setting Up a Development Environment#
For contributors or those who want to work on MOABB’s codebase, follow these steps:
Ensure pip is installed. (Refer to the pip installation guide.)
Basic Editable Installation (without optional dependencies): In the project directory, run:
pip install -e .
Editable Installation with Optional Dependencies: If you require additional features (e.g., deep learning, testing), install with:
pip install -e .[deeplearning,carbonemission,docs,optuna,tests,external]
For a complete list of optional dependencies, consult the pyproject.toml file.
Setup Pre-Commit Hooks: To help maintain code quality, install the
pre-commit
tool by following the Pre-Commit Installation guide. For further instructions on contributing, see the Contributors Guidelines.
Verifying the Installation#
To ensure that MOABB is installed and functioning correctly, run:
pytest moabb/tests --verbose
For more details or troubleshooting, please refer to the Contributors Guidelines.