devops@devops-virtual-machine:~$ sudo apt-get install openssh-server
devops@devops-virtual-machine:~$ sudo apt-get install python3 devops@devops-virtual-machine:~$ sudo apt install python3-pip
devops@devops-virtual-machine:~$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 devops@devops-virtual-machine:~$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
devops@devops-virtual-machine:~$ python --version Python 3.6.5
devops@devops-virtual-machine:~$ sudo update-alternatives --config python 有 2 個候選項可用於替換 python (提供 /usr/bin/python)。 選擇 路徑 優先級 狀態 ------------------------------------------------------------ * 0 /usr/bin/python3 150 自動模式 1 /usr/bin/python2 100 手動模式 2 /usr/bin/python3 150 手動模式 要維持當前值[*]請按<回車鍵>,或者鍵入選擇的編號:1 update-alternatives: 使用 /usr/bin/python2 來在手動模式中提供 /usr/bin/python (python) devops@devops-virtual-machine:~$ python --version Python 2.7.15rc1
devops@devops-virtual-machine:~$ sudo update-alternatives --config python 有 2 個候選項可用於替換 python (提供 /usr/bin/python)。 選擇 路徑 優先級 狀態 ------------------------------------------------------------ 0 /usr/bin/python3 150 自動模式 * 1 /usr/bin/python2 100 手動模式 2 /usr/bin/python3 150 手動模式 要維持當前值[*]請按<回車鍵>,或者鍵入選擇的編號:0 update-alternatives: 使用 /usr/bin/python3 來在自動模式中提供 /usr/bin/python (python) devops@devops-virtual-machine:~$ python --version Python 3.6.5