{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  Installation and running\n",
    "\n",
    "BCI-Framework needs **Python >= 3.8** due the utilizations of [cached_property](https://docs.python.org/3/library/functools.html#functools.cached_property) and the amazing new [walrus operator](https://docs.python.org/3/whatsnew/3.8.html#assignment-expressions), priors versions were not tested and there is not planning to do it."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Install from PyPi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$ pip install -U bci-framework\n",
    "$ bci-framework"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Install from source code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$ git clone https://github.com/UN-GCPDS/bci-framework.git\n",
    "$ cd bci-framework\n",
    "$ pip install -r requirements.txt\n",
    "$ python setup.py install\n",
    "$ python -m bci_framework"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Install in virtual environment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$ python -m venv bciframework-env\n",
    "$ source bciframework-env/bin/activate\n",
    "$ pip install -U bci-framework\n",
    "$ python -m bci_framework"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Running\n",
    "\n",
    "With the [hardware properly configured](01-configuration.ipynb) we can start the BCI-Framework application.  \n",
    "If you are running from source code, you must start the application as a named module:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$ python -m bci_framework"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If the application is already installed, then the `bci-framework` command is available to run from the terminal:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$ bci-framework"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
