From 2a59cb94664673c94100ea7f23c5d733e1010949 Mon Sep 17 00:00:00 2001 From: Mario Alegre Date: Sat, 12 Dec 2020 17:48:51 -0500 Subject: [PATCH] added script to set alternatives for python --- linux/system/python-alternatives.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 linux/system/python-alternatives.sh diff --git a/linux/system/python-alternatives.sh b/linux/system/python-alternatives.sh new file mode 100755 index 0000000..a685ca4 --- /dev/null +++ b/linux/system/python-alternatives.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for python in /usr/bin/python*; do + if [[ $(basename $python) =~ ^python[0-9][.][0-9]$ ]]; then + sudo update-alternatives --install /usr/bin/python python $python 1 + fi +done + +sudo update-alternatives --config python