1. Setting up Python and Brian¶
To solve the exercises you need to install Python, Brian2 and the neurodynex package. The installation procedure we described here focuses on the tools we use in the classroom sessions at EPFL. For that reason we additionally set up a conda environment (which we call bmnn below) and install Jupyter .
1.1. Using miniconda (recommended)¶
We offer anaconda packages for the most recent releases, which is the easiest way of running the exercises.
Head over to the miniconda download page and install miniconda (for Python 2.7 preferably). You can then use conda to install Jupyter. Open a terminal and call:
>> conda install jupyter
Now execute the following commands to install the exercise package as well as Brian2 and some dependencies. Note: we create a conda environment called ‘bmnn’. You may want to change that name.
>> conda create --name bmnn python=2.7
>> source activate bmnn
>> conda install -c brian-team -c epfl-lcn neurodynex
If you need to update the exercise package, call:
>> source activate bmnn
>> conda update -c brian-team -c epfl-lcn neurodynex
1.2. Alternative procedure: Using python and pip¶
If you already have Python installed and prefer using PIP, you can get the most recent versions of this repository as a pypi package called neurodynex
.
To install the exercises using pip
simply execute (the --upgrade
flag will overwrite existing installations with the newest versions):
pip install --upgrade neurodynex
Note
Should you want to run Spyder to work on the exercises, and you’re running into problems (commonly, after running conda install spyder
you can not start spyder
due to an error related to numpy), try the following:
# create a new conda environment with spyder and the exercises
conda create --name neurodynex -c brian-team -c epfl-lcn neurodynex spyder
# activate the environment
source activate neurodynex
This creates a new conda environment (here is more information on conda environments) in which you can use spyder together with the exercises.
1.3. Links¶
Here are some useful links to get started with Python and Brian