1 Python set up
Before starting the course, we need to install the course materials and all dependency packages (such as SpikeInerface) onto your machine.
To do this we will create an isolated environment in which to install packages, either using uv (recommended) or conda.
1.1 Download the repository
First, open a Terminal client (Linux and Mac have an in-built Terminal app, while Windows has Powershell. Microsoft recently released Windows Terminal which is similar to the Linux/Mac apps). Navigate to a folder you would like to save this course. Now clone the course repository with git:
git clone https://github.com/neuroinformatics-unit/course-ephys-osss.git
cd course-ephys-osssIf you don’t have git installed, you can instead download the repository as a ZIP file from the GitHub page (click the green Code button, then Download ZIP) and unzip it.
1.2 Create the environment
uv is a fast Python package and environment manager. If you don’t have it yet, follow the installation instructions.
From inside the course-ephys-osss folder, create a virtual environment and install the project (along with all its dependencies):
uv venv
uv pip install -e .Note: this is downloading and installing all packages needed for the week so might take 5-10 minutes, depending on your internet connection.
uv venv creates a .venv folder in the repository. To activate it:
# macOS / Linux
source .venv/bin/activate
# Windows (PowerShell)
.venv\Scripts\Activate.ps1Note: your Python environment lives inside the course-ephys-osss folder. If you want to active this environment again, you need to navigate to this folder in your Terminal, then re-run the above command.
conda is a widely used Python environment and package manager. If you don’t have it yet, we recommend installing Miniconda.
From inside the course-ephys-osss folder, create and activate a new environment:
conda create -n course-ephys python=3.12 -y
conda activate course-ephysThen install the project (along with all its dependencies) using pip:
pip install -e .To use the course environment from an IDE such as VS Code or PyCharm, set the Python interpreter path in the IDE settings to the environment’s Python executable (see links for more information). For the uv environment, this is .venv\Scripts\python.exe on Windows or .venv/bin/python on macOS/Linux.
1.3 Check the installation
With the environment active, check that the package imports correctly:
python -c "import course_ephys_osss; print('Setup complete!')"If this runs without error, you’re ready to start the course.