Installation#
Prerequisites#
You need Python 3.8 or newer and pip. Free-threaded Python builds (3.14t and later) are supported too.
If Python is missing, refer to the following guides:
Installing Python: Learn how to install Python.
Setting up Anaconda: Get started with Anaconda environments, or use your preferred environment manager.
Wheels that carry the native library are built for:
Linux x86_64 and aarch64 (64-bit ARM) with glibc 2.28 or newer: RHEL, AlmaLinux and Rocky Linux 8+, Debian 10+, Ubuntu 18.10+, and Raspberry Pi OS 10+ (64-bit),
macOS 11 or newer, on Apple silicon and Intel,
Windows 10 or 11 on x64.
The wheels are self-contained: no separate installation of the BrainAccess library is needed. Each operating system needs a working Bluetooth Low Energy adapter, and a little more:
Linux: the BlueZ Bluetooth service must be running and the adapter powered on (for example
bluetoothctl power on). The D-Bus client library (libdbus) is bundled in the wheel.macOS: on first use, macOS asks whether the application that runs Python (Terminal, your IDE, …) may use Bluetooth. Allow it. If it was denied, scans find no headset and raise no error; you can change the setting in System Settings → Privacy & Security → Bluetooth.
Windows: a Bluetooth LE adapter, built in or a USB dongle.
Installing from PyPI#
Activate your Python environment (for example virtualenv, Conda, or system Python).
Install the BrainAccess Python API:
pip install brainaccess
Installing a downloaded wheel#
If you received a wheel file instead, install it directly. Pick the file that matches your operating system and CPU
(for example manylinux_2_28_x86_64, manylinux_2_28_aarch64, macosx_11_0_arm64, macosx_11_0_x86_64 or
win_amd64):
pip install brainaccess-4.0.0-py3-none-<platform>.whl
Bluetooth connection setup#
To connect a BrainAccess headset:
Insert a Bluetooth adapter if needed (skip this if your computer has built-in Bluetooth).
Turn on the headset.
Find its name. It is printed on the back of the headset, and
brainaccess.core.scan()lists the headsets in range (callbrainaccess.core.init()first).Enter that name as
device_namein your code, as in the Minimal data acquisition and Continuous data acquisition with MNE examples.
Warning
Do not pair the headset in your operating system’s Bluetooth settings. The library manages the connection itself.