neuro-conda / neuro-conda

A Python distribution for neuroscience based on conda 🧠🐍
https://pantaray.github.io/neuro-conda-bremen-2023
MIT License
7 stars 0 forks source link
conda conda-environment neuroscience python

Test Installation

neuro-conda 🧠🐍

⚠️Warning: neuro-conda on macOS is currently broken. We're working on getting the installer for macOS functional again.⚠️

Although creating a virtual environment for each project is considered best practice, it can be a major obstacle for early-career neuroscientists that are just starting to learn programming. neuro-conda aims to simplify learning and using Python in neuroscience by bundling commonly used packages in neuroscience into curated conda environments, i.e. providing a Python distribution for neuroscience based on conda.

Currently neuro-conda includes the following neuroscientific Python packages (in alphabetic order):

More neuroscience tools will be added in the future. Please open an issue or pull request if you'd like a specific package to be included.

neuro-conda is inspired by similar projects at the Ernst Strüngmann Institute for Neuroscience, University of Cambridge and NeuroDesk, providing easy-to-install Python environments for neuroscience.

Fresh installation

Windows 10 and 11 (PowerShell)

Open a PowerShell and run the following command:

irm https://neuro-conda.github.io/neuro-conda/libexec/install.ps1 | iex

Linux, macOS and Windows Subsystem for Linux (WSL)

Open a terminal (Terminal.App in macOS) and run the following command:

curl -fsSL https://neuro-conda.github.io/neuro-conda/libexec/install.sh | bash

Install neuro-conda using an existing conda installation

Windows 10/11 (PowerShell)

Invoke-WebRequest "https://raw.githubusercontent.com/neuro-conda/neuro-conda/main/envs/neuro-conda-latest.yml" -OutFile "$Env:temp\neuro-conda-latest.yml"
conda env create --file "$Env:temp\neuro-conda-latest.yml"

Linux, WSL, macOS

wget "https://raw.githubusercontent.com/neuro-conda/neuro-conda/main/envs/neuro-conda-latest.yml" -O /tmp/neuro-conda-latest.yml
conda env create --file /tmp/neuro-conda-latest.yml

Uninstall neuro-conda

Windows 10 and 11 (PowerShell)

Open a PowerShell and run the following command:

Invoke-WebRequest https://raw.githubusercontent.com/neuro-conda/neuro-conda/main/libexec/uninstall.ps1 -OutFile $Env:temp\uninstall_neuroconda.ps1; Invoke-Expression $Env:temp\uninstall_neuroconda.ps1;

Linux, WSL, macOS

Open a terminal and run the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/neuro-conda/neuro-conda/main/libexec/uninstall.sh)"

Customizing neuro-conda

The following environment variables can be used to control the neuro-conda installer/uninstaller (detailed explanation below).

Variable Description Windows Linux/WSL macOS
ncTargetDirectory installation location
ncDebug show debug messages
ncEnv choose neuro-conda environment
ncEditor install Spyder
ncNoninteractive do not prompt for input
ncCI CI pipeline mode

The variables have to be set before running the neuro-conda installer/uninstaller and must be available to other processes started by the installer, e.g.,

ncTargetDirectory (installer only)

Specify the location of the neuro-conda installation. By default, neuro-conda is installed inside the active user's home directory. Note that the specified directory must not exist.

ncDebug

If set, the (un)installer prints (a lot of) additional progress/status messages. Note that the actual value of ncDebug is irrelevant, if the variable is set (to anything), the (un)installer picks it up.

ncEnv (installer only)

Specifies the environment to create during the installation process. By default, the installer always creates the most recent neuro-conda environment defined in the YAML file neuro-conda-latest.yml (consult the envs directory for all available environments)

ℹ️ INFO As of June 2023, neuro-conda only ships with a single environment file (neuro-conda-latest.yml) that contains the environment neuro-conda-2023a. Setting ncEnv to anything other than neuro-conda-2023a results in an error.

ncEditor (installer only)

If set, the Python IDE Spyder is installed alongside neuro-conda.

ncNonInteractive

If set, the (un)installer does not ask for confirmation. The actual value of ncNonInteractive is irrelevant, if the variable is set (to anything), any confirmation dialogs will be automatically answered with "yes". By default, the (un)installer asks the user for confirmation when performing changes to the system.

⚠️ WARNING The (un)installer only asks for confirmation before making permanent changes to the system. Automatically confirming all dialogs without double-checking may result in damaged installations.

ncCI

If set, the (un)installer assumes it was executed by a continuous integration pipeline (e.g., GitHub Action) and activates ncNonInteractive. Note that the actual value of ncCI is irrelevant, if the variable is set (to anything), the (un)installer picks it up.

⚠️ WARNING Setting ncCI turns off all confirmation prompts (see ncNonInteractive above).

Extending a neuro-conda installation

Coming soon...