Code Monkey home page Code Monkey logo

Test Installation

neuro-conda 🧠🐍

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.,

  • 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.

  • Linux/macOS/WSL: By default, ncTargetDirectory="${HOME}/.local/miniconda3", to install neuro-conda to /path/to/conda use export ncTargetDirectory="/path/to/conda"
  • Windows PowerShell: By default, neuro-conda is installed in the directory "miniconda3" inside the active user's home folder (usually 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.

  • Linux/macOS/WSL: By default, ncDebug is not defined. Setting it to an arbitrary value, e.g., export ncDebug=1 activates debug messaging.
  • Windows PowerShell: By default 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 environment neuro-conda-2023a. Setting ncEnv to anything other than neuro-conda-2023a results in an error.

  • Linux/macOS/WSL: To create an older neuro-conda environment, use, e.g., export ncEnv="neuro-conda-2023a"
  • Windows PowerShell: To create a specific neuro-conda environment, use, e.g., $Env:ncEnv = "neuro-conda-2023a"

ncEditor (installer only)

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

  • Linux/macOS/WSL: By default, ncEditor is not defined. Setting it to an arbitrary value, e.g., export ncEditor=1 installs Spyder.
  • Windows PowerShell: Not yet supported.

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.

  • Linux/macOS/WSL: By default, ncNonInteractive is not defined. Setting it to an arbitrary value, e.g., export ncNonInteractive=1 prevents the (un)installer from prompting for confirmation
  • Windows PowerShell: By default ncNonInteractive 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 (see ncNonInteractive above).

  • Linux/macOS/WSL: By default, ncCI is not defined. Setting it to an arbitrary value, e.g., export ncCI=1 activates CI mode.
  • Windows PowerShell: By default ncCI is not set. CI mode is activated if ncCI is set to an arbitrary value, e.g., $Env:ncCI = 1

Extending a neuro-conda installation

Coming soon...

neuro-conda's Projects

neuro-conda icon neuro-conda

A Python distribution for neuroscience based on conda 🧠🐍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.