From c8291167e5eb1a23734d279ff9a48ce76b781940 Mon Sep 17 00:00:00 2001 From: MB <michael.blaschek@univie.ac.at> Date: Thu, 17 Feb 2022 19:22:54 +0100 Subject: [PATCH] conda kernel script --- Python/conda-kernel-setup.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Python/conda-kernel-setup.sh diff --git a/Python/conda-kernel-setup.sh b/Python/conda-kernel-setup.sh new file mode 100644 index 0000000..d469697 --- /dev/null +++ b/Python/conda-kernel-setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# By MB +# Jumpstart a python environment for my students + +# Activate anaconda module +module load anaconda3 +# Create a new kernel that is based on anaconda, but with some additional packages +# potentially specify which python version, e.g. python=3.8 +conda create -y -n ClimatePy3 numpy ipykernel zarr +# This will create a ~/.conda/envs/ClimatePy3/ directory +# using ~/.conda/envs/ClimatePy3/bin/python3 in a script is possible + +# activate that environment by sourcing the conda environment +source $(dirname $(which conda))/../etc/profile.d/conda.sh +# and activating your new +conda activate ClimatePy3 + +# deactivate environment +conda deactivate +# FIN \ No newline at end of file -- GitLab