Installation

The installation process is tested on three x86_64 platforms:

  • Linux (Ubuntu 18.04)

  • Mac OS (High Sierra 10.13.6)

  • Windows 10

Prerequisites

The following software should be installed:

  • Git: for installing OpenNFT and, optionally, for installing SPM and Psychtoolbox

  • MATLAB x86_64 R2017b or above
  • Python x86_64 from 3.6.0 to 3.8.6

Note

The minimum system requirements for OpenNFT are 8 GB RAM, i5 CPU with 2 or 4 free cores for two modes of the software using 3 or 4 Matlab processes, respectively, which needs to be compromised with the neurofeedback study design complexity, computational demands and the repetition time of the data acquisition. The recommended system configuration is 16 GB RAM and i7 CPU with 4 free cores. The maximum number of Matlab processes is defined by the end-user and is limited by the local workstation capabilities.

Install OpenNFT

We recommend a virtual environment for installing OpenNFT.

Create and Activate Virtual Environment

Unix (Linux, MacOS)

Note

For Linux system you may first need the following command:

sudo apt install python3-venv
cd /path/to/your/workspace/directory
python3 -m venv opennft-venv
source opennft-venv/bin/activate
python -m pip install -U pip setuptools wheel

Windows

cd C:\path\to\your\workspace\directory
py -3 -m venv opennft-venv
opennft-venv\Scripts\activate.bat
python -m pip install -U pip setuptools wheel

Install from GitHub

Note

It is assumed that the virtual environment has been created and activated. Please see above how to create and activate the virtual environment on your platform.

Run the command:

pip install git+https://github.com/OpenNFT/OpenNFT.git

Note

If you do not have the write access in MATLABROOT, the installer will try to install “Matlab Engine for Python” with Administrator/root privileges, i.e., elevating privileges via UAC/sudo.

Install from Project Directory

Alternatively, you can install OpenNFT from your working directory (OpenNFT project root directory). It is convenient if you are working on the project or want to contribute.

Cloning the project repository

First, the project repository (or its fork) is cloned:

cd /path/to/your/workspace/directory
git clone --recurse-submodules https://github.com/OpenNFT/OpenNFT.git

Install the project dependencies

Second, project dependencies are installed:

Note

The virtual environment should be activated. See above how to create and activate the virtual environment on your platform.

pip install -U -r /path/to/your/workspace/directory/OpenNFT/requirements.txt

Install OpenNFT

Third, OpenNFT is installed:

pip install /path/to/your/workspace/directory/OpenNFT/

Additional Notes

For installing in editable mode (development mode), you can use the -e/--editable option:

pip install -e /path/to/your/workspace/directory/OpenNFT/

If there are several MATLAB versions, you have to install requirements and specify the MATLAB root directory during OpenNFT installation.

pip install -U pip setuptools wheel
pip install -U -r /path/to/your/workspace/directory/OpenNFT/requirements.txt
pip install --install-option "--matlab-root=<MATLABROOT>" /path/to/your/workspace/directory/OpenNFT/

You can use both -e/--editable and --install-option "--matlab-root=<MATLABROOT>" options at the same time:

pip install -U pip setuptools wheel
pip install -U -r /path/to/your/workspace/directory/OpenNFT/requirements.txt
pip install --install-option "--matlab-root=<MATLABROOT>" -e /path/to/your/workspace/directory/OpenNFT/

Note

If you do not have the write access to MATLABROOT, the installer will try to install the “Matlab Engine for Python” with Administrator/root privileges, elevating privileges via UAC/sudo.

Check Installation

Run the command:

pip list

Check the existence of matlabengineforpython and OpenNFT names. If the Installation went well, you should see them as:

Package               Version    Location
--------------------- ---------- -----------------------------
...
matlabengineforpython R2017b
...
OpenNFT               1.0.0   c:\workspace\projects\OpenNFT
...

Run Application

To start OpenNFT, run the command in the Terminal:

opennft