#!/bin/bash set -e ## Exit if Problems set -u ## Fail on Undefined Variable SCRIPT_PATH="$(dirname "$(readlink -f "$0")")" apt update apt install python3 python3-venv python-is-python3 -y cd "$SCRIPT_PATH" if [ ! -d .venv-1 ]; then python3 -m venv ".venv-1" fi if [ ! -d .venv-2 ]; then python3 -m venv ".venv-2" fi . .venv-1/bin/activate pip install numpy==1.24 pip install matplotlib==3.6 python3 -c "import numpy as np; print(np.array([1, 2, 3]))" deactivate . .venv-2/bin/activate pip install numpy==1.23 pip install matplotlib==3.6 python3 -c "import numpy as np; print(np.array([1, 2, 3]))" deactivate cd - bash