Installation#
This guide covers the installation of eegprep and its dependencies.
System Requirements#
Before installing eegprep, ensure your system meets the following requirements:
Python: 3.10 or higher
pip: Latest version (for pip installation)
conda: Latest version (for conda installation, optional)
Operating System: Linux, macOS, or Windows
RAM: Minimum 4GB (8GB+ recommended for large datasets)
Disk Space: At least 500MB for installation and dependencies
Installation Methods#
Using pip (Recommended)#
The easiest way to install eegprep is using pip:
pip install eegprep
To upgrade an existing installation:
pip install --upgrade eegprep
Using conda#
If you prefer conda, you can install eegprep from the conda-forge channel:
conda install -c conda-forge eegprep
To create a new conda environment with eegprep:
conda create -n eegprep-env python=3.10 eegprep
conda activate eegprep-env
From Source#
To install eegprep from source for development:
git clone https://github.com/sccn/eegprep.git
cd eegprep
pip install -e .
The -e flag installs the package in editable mode, allowing you to modify the source code and see changes immediately.
Optional Dependencies#
eegprep has several optional dependencies that enable additional functionality:
PyTorch (for GPU acceleration)#
To use GPU-accelerated processing with PyTorch:
pip install torch
For CUDA support (NVIDIA GPUs):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
For CPU-only PyTorch:
pip install torch --index-url https://download.pytorch.org/whl/cpu
EEGLAB I/O Support#
To enable reading and writing EEGLAB .set files:
pip install eeglabio
MNE-Python Integration#
For integration with MNE-Python:
pip install mne
Documentation Building#
To build the documentation locally:
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints
All Optional Dependencies#
To install all optional dependencies at once:
pip install eegprep[all]
Or with specific extras:
pip install eegprep[torch,mne,docs]
Verification#
After installation, verify that eegprep is correctly installed by running:
import eegprep
print(eegprep.__version__)
You should see the version number printed without any errors.
To verify all core modules are available:
from eegprep import (
pop_loadset,
pop_saveset,
clean_artifacts,
iclabel,
pop_resample,
pop_reref,
topoplot
)
print("All core modules imported successfully!")
Troubleshooting#
Import Errors#
Problem: ModuleNotFoundError: No module named 'eegprep'
Solution: Ensure eegprep is installed:
pip install eegprep
If installing from source, ensure you’re in the correct directory and use:
pip install -e .
Version Conflicts#
Problem: Conflicts with NumPy, SciPy, or other dependencies
Solution: Create a fresh virtual environment:
python -m venv eegprep_env
source eegprep_env/bin/activate # On Windows: eegprep_env\Scripts\activate
pip install eegprep
PyTorch Installation Issues#
Problem: PyTorch installation fails or GPU not detected
Solution:
Check your CUDA version:
nvidia-smi
Install the matching PyTorch version from https://pytorch.org/get-started/locally/
Verify PyTorch installation:
import torch
print(torch.cuda.is_available())
EEGLAB File Format Issues#
Problem: Cannot read .set files
Solution: Install eeglabio:
pip install eeglabio
Then verify:
from eegprep import pop_loadset
# Should work without errors
Memory Issues#
Problem: Out of memory errors when processing large datasets
Solution:
Process data in chunks or epochs
Reduce the number of channels if possible
Increase available RAM or use a machine with more memory
Use GPU acceleration if available
Getting Help#
If you encounter issues not covered here:
Check the FAQ section
Review the Common Issues guide
Visit the GitHub Issues page
Check the API Documentation
Next Steps#
After successful installation, proceed to the Quick Start guide to learn how to use eegprep.