Conda environments
Contents
Conda environments#
Conda environments provide collections of pre-installed software packages. There are two types of conda environments that can be used with MalariaGEN DataLab, described below.
Custom environments#
If you need some packages that are not available in any of the pre-configured shared conda environments, you can create your own custom conda environment, which will be stored in your home directory.
Note
Custom environments cannot be shared with other users, and you won’t be able to use the environment with dask clusters. It will only be available for running notebooks on your server.
To create a new custom environment, open a terminal, and do e.g.:
conda create --prefix=/home/jovyan/conda/myenv1 -c conda-forge python=3.7 ipykernel
Make sure to include ipykernel
in the environment, this will make sure the new environment appears in the launcher.
You should see the new environment if you do:
conda env list
To activate the new environment, use the full environment path, e.g.:
conda activate /home/jovyan/conda/myenv1
Once activated, you can install any new packages with conda or pip, e.g.:
conda install -c conda-forge pandas xarray
pip install malariagen_data
You can now exit the terminal. The new environment should appear in the launcher, so you can create a notebook using it.
If you decide you want to get rid of the environment, make sure to shut down any running kernels, then do:
conda env remove --prefix=/home/jovyan/conda/myenv1