Installation Instructions

Install natMEEG

From PyPI:

pip install natmeeg

From source

Download source files from the GitHub repository (tarball archive release or source distribution in PyPI) and extract them.

Then, from the folder containing pyproject.toml:

pip install .

Development installation

To install the package in editable/developer mode with uv:

uv sync

For working on the documentation, install the docs extra as well:

uv sync --extra docs

Note

To ensure that the code you run follows your edit, you may want to install the library in developer mode. By doing so, only symbolic links will be created on installation targeting your source code. Thus, any change to the code will be directly usable when importing natMEEG’s functions.

Developer mode can be beneficial when working on several branches of the code, for instance, and being able to switch from one instance to another depending on which branch you have checked out, or simply when editing the source code. To install in developer mode:

pip install -e  .

Optional dependencies

The following optional extras are defined in pyproject.toml:

  • [mne] — installs MNE-Python (mne), the standard toolbox for M/EEG data handling and analysis.

  • [docs] — installs the dependencies needed to build the documentation: sphinx, sphinx-rtd-theme, nbsphinx and ipykernel.

  • [features] — installs the dependencies needed for the LLM-based stimulus feature extraction in pyeeg.features.llm_features: torch and transformers. Required to use LLMFeatureExtractor.

  • [full] — installs everything (MNE, documentation, and LLM feature dependencies): mne, sphinx, sphinx-rtd-theme, nbsphinx, torch and transformers.

  • [exploratory-trf] — installs the web-server dependencies of the exploratory TRF dashboard: flask (>= 2.0.0), werkzeug (>= 2.0.0) and gunicorn (>= 20.0.0).

Install an extra with, for example:

pip install natmeeg[full]

Generate documentation

  • On Windows:

.\make.bat html
  • On Linux/Mac:

make doc

If you have modified the documentation source files, you might need to clean the build directories before running make doc again:

make clean && make doc