Skip to content
Snippets Groups Projects
Commit ae85c050 authored by Nils Brüggemann's avatar Nils Brüggemann
Browse files

Added tools/act_pyicon_py39.sh to activate new python 3.9 environment.

parent 7e78d286
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
t1=`date +%Y-%m-%d_%H-%M-%S`
# --- conda env settings
# script to working conda environment
path_conda_bin="/home/mpim/m300602/miniconda3/bin/"
# name of working conda environment
conda_env="/work/mh0033/m300602/miniconda3/envs/pyicon_py39"
# --- add pyicon to PYTHONPATH
PYICON_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )" #problem: takes directory of source script as base
#PYICON_PATH="$( cd "$(pwd)/.." >/dev/null 2>&1 && pwd )" # problem: takes directory as base from where this script is called
export PYTHONPATH="${PYICON_PATH}"
# use this if you have a harmless PYTHONPATH which you want to keep
#export PYTHONPATH="${PYICON_PATH}:${PYTHONPATH}"
echo "PYTHONPATH was modified to:"
echo "${PYTHONPATH}"
echo ""
# --- activate conda environment
echo "Activate conda environment by:"
echo "${path_conda_bin}/activate ${conda_env}"
source ${path_conda_bin}/activate ${conda_env}
echo ""
# --- print some information
conda_path=`which conda`
echo "Active conda:"
echo "${conda_path}"
python_path=`which python`
echo "Active python:"
echo "${python_path}"
t2=`date +%Y-%m-%d_%H-%M-%S`
echo "All done!"
echo "Start ${t1}"
echo "End ${t2}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment