Conda environments

A tutorial for setting up your conda environments on Neurodesk.

This tutorial was created by Fernanda L. Ribeiro.

Email: fernanda.ribeiro@uq.edu.au

Github: @felenitaribeiro

Twitter: @NandaRibeiro93

This tutorial documents how to create conda environments on Neurodesk.

Conda environment

Conda is promptly available on Neurodesk. The default environment is not persistent across sessions, but you can create your own environment, which will be stored in your homedirectory, by following these steps:

  1. In a Terminal window, type in:

1_terminal

For Python:

conda create -n myenv ipykernel

or for R:

conda create -n r_env r-irkernel

Important: For Python environments, you have to set the ipykernel explicitly or a Python version (like “conda create -n myenv python=3.8”), since a kernel is required. Alternatively, in case it was forgotten, you can add a kernel with:

conda install ipykernel
  1. To check the list of environments you have created, run the following:
conda env list
  1. To activate your conda environment and install required packages from a provided txt file, run:
conda activate myenv
pip install -r requirements.txt
  1. Given the available environment, when you open a new Launcher tab, there will be a new Notebook option for launching a Jupyter Notebook with that environment active.

2_env

Switching the environment on a Jupyter Notebook is also possible on the top right corner dropdown menu.

3_notebook

Last modified September 25, 2023: update to new version 2023-09-20 (088e1f8)