--------------------------
/ \
------------------------------------
/ \
-------------------------------------------------
/ /\/\/\/\/\
---------------------------------------------------
| F i e l d T r i p |
------------------------------------------
\ /
------------------------------------
\ /
----------
The Python interface to FieldTrip
Warning
This project is young and might contain bugs. If you experience any issues, please let us know!
Python installation made from Microsoft Store on Windows will not work (raises DeclarativeService.dll not found), install it from Python website.
Specific versions of MATLAB are compatible with specific versions of Python.
By default, fieldtrip-python uses R2025b, which is compatible with Python 3.10-3.13.
- Install FieldTrip-Python
pip install https://github.com/johmedr/fieldtrip-python/releases/latest/download/fieldtrip_python-20241219b1-py3-none-any.whl
- Start Python
python
- Calling a FieldTrip function will try to locate or install MATLAB Runtime.
import fieldtrip ft_info('Hello, world')
- Follow the instructions to install the runtime
- Advantages
- Installs the runtime that is required for your python version
- Does not resintall anything if a compatible runtime already exists
- Drawbacks
- May need to be run in proviledged mode (e.g.,
sudo) - May be fiddly on Windows
- May need to be run in proviledged mode (e.g.,
- Install the appropriate MATLAB Runtime
- Install FieldTrip:
pip install https://github.com/johmedr/fieldtrip-python/releases/latest/download/fieldtrip_python-20241219b1-py3-none-any.whl
- Advantages
- Graphical interface for installing the runtime
- Drawbacks
- The correct runtime must be selected for your python version
- Install FieldTrip-Python
pip install https://github.com/johmedr/fieldtrip-python/releases/latest/download/fieldtrip_python-20241219b1-py3-none-any.whl
- Run the installer
install_matlab_runtime --version R2025b --yes
- Advantages
- Exposes installation options (
install_matlab_runtime --help)
- Exposes installation options (
- Drawbacks
- For advanced users