Create the course conda environment

1. Install Mamba

Follow these instructions to install Conda.

After restarting, you can type the command below to install Mamba:

  conda init
  conda install -n base -c conda-forge mamba

 

2. Create a conda environment from file

To download the environment_spatial2022.yml file using the command on Terminal:

curl -o environment_spatial2022.yml https://raw.githubusercontent.com/NBISweden/workshop-spatial/main/labs/environment_spatial2022.yml

After this, you should have a file named environment_spatial2022.yml in your directory (it does not matter where). Next, type:

mamba env create -n spatial2022 -f environment_spatial2022.yml

Several messages will show up on your screen and will tell you about the installation process. This may take a few minutes depending on how many packages are to be installed.

##Collecting package metadata: done
##Solving environment: done
##
##Downloading and Extracting Packages
##libcblas-3.8.0       | 6 KB      | ############################################################################# | 100%
##liblapack-3.8.0      | 6 KB      | ############################################################################# | 100%
##...
##Preparing transaction: done
##Verifying transaction: done
##Executing transaction: done

 

3. Activate the environment

Once the environment is created, we need to activate it in order to use the softwares and packages inside it. To activate an environment type:

conda activate spatial2022

 

4. Deactivate the environment

After you've ran all your analyses, you can deactivate the environment by typing:

conda deactivate