⚠️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):
Electrophysiology (spikes + LFP): brian2, elephant, viziphant, esi-syncopy, neurotic, pynapple, spyking-circus, spikeinterface, spikeinterface-gui, suite2p
Electrophysiology (LFP + M/EEG): bycycle, fooof, neurodsp, mne (including the extensions alphaCSC, eelbrain, invertmeeg (only on Linux), mne-ari, mne-bids, mne-bids-pipeline, mne-connectivity, mne-features, mne-icalabel, mnelab, mne-microstates, mne-nirs, mne-realtime, mne-rsa, neurokit2, pactools, pyprep, sesameeg),
Neuroimaging: dipy, intensity-normalization
File/data formats: neo, nibabel, napari-nibabel, nixio, pybids, pydicom + deid, pynwb
Machine Learning: nilearn, nipype, nitime (only on Windows and Linux), PyTorch, scikit-learn, tensorflow,
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.
Open a PowerShell and run the following command:
irm https://neuro-conda.github.io/neuro-conda/libexec/install.ps1 | iex
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
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"
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
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;
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)"
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.,
Linux/macOS/WSL:
export ncDebug=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/neuro-conda/neuro-conda/main/libexec/install.sh)"
Windows PowerShell:
$Env:ncDebug = 1
Invoke-WebRequest https://raw.githubusercontent.com/neuro-conda/neuro-conda/main/libexec/install.ps1 -OutFile $Env:temp\install_neuroconda.ps1; Invoke-Expression $Env:temp\install_neuroconda.ps1;
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.
ncTargetDirectory="${HOME}/.local/miniconda3"
,
to install neuro-conda to /path/to/conda
use export ncTargetDirectory="/path/to/conda"
C:\Users\<username>
). If no active user is
detected or the username contains spaces,
the installer falls back on the "public" folder (usually C:\Users\Public
). To point the
installer to another location use, e.g., $Env:ncTargetDirectory = "F:\work\neuro-conda"
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.
ncDebug
is not defined. Setting it
to an arbitrary value, e.g., export ncDebug=1
activates debug messaging.ncDebug
is not set. Debug messages
are shown if ncDebug
is set to an arbitrary value, e.g., $Env:ncDebug = 1
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 environmentneuro-conda-2023a
. SettingncEnv
to anything other thanneuro-conda-2023a
results in an error.
export ncEnv="neuro-conda-2023a"
$Env:ncEnv = "neuro-conda-2023a"
ncEditor
(installer only)If set, the Python IDE Spyder is installed alongside neuro-conda.
ncEditor
is not defined. Setting it
to an arbitrary value, e.g., export ncEditor=1
installs Spyder.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.
ncNonInteractive
is not defined. Setting it
to an arbitrary value, e.g., export ncNonInteractive=1
prevents the
(un)installer from prompting for confirmationncNonInteractive
is not set. All
confirmation dialogs are automatically answered with "yes" if ncNonInteractive
is set to an arbitrary value, e.g., $Env:ncNonInteractive = 1
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 (seencNonInteractive
above).
ncCI
is not defined. Setting it
to an arbitrary value, e.g., export ncCI=1
activates CI mode.ncCI
is not set. CI mode is activated
if ncCI
is set to an arbitrary value, e.g., $Env:ncCI = 1
Coming soon...