Python

Anaconda3 Python is available in /usr/local/anaconda3/bin.

Conda

Note

Anaconda is disabled by default. Otherwise, Anaconda libraries interfere with the operating system network utilities.

When you want Anaconda, run conda activate <env_name> in your terminal. Instructions are below.

  • To list environments:

    conda env list
    
  • To create an environment:

    conda create --name <env_name>
    

    Replace <env_name> with the name of your environment. No packages will be installed in this environment. Confirm the env location with ‘conda env list’.

  • To create an environment with a specific package:

    conda create -n <env_name> scipy
    

    which can also be accomplished using:

    conda create -n <env_name> python
    conda install -n <env_name> scipy
    
  • To activate a conda environment:

    conda activate <env_name>
    
  • To leave your conda environment:

    conda deactivate
    
  • More information about managing environments is here:

    https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

packages

Conda integration with Slurm (batch processing)

By default, Slurm doesn’t initialize conda environments from a user’s .bashrc file.

To initialize conda, add the following line to your slurm submit script:

eval "$(/usr/local/anaconda3/bin/conda shell.bash hook)"
conda activate <env_name>

Jupyter Notebook

You may run jupyter notebook/lab on the neuro cluster with a Firefox web browser.

  1. Log in via ref:remote desktop<rdp>

  2. open a terminal window

  3. From your terminal on the neuro cluster, run ‘jupyter notebook’:

    jupyter notebook
    

Note

Firefox has limited access to the internet.