Trucrux Inc

Switching Python

Package.gz for OTA update on apache server Copy #

Ensure that your system has the latest available packages and install Python 2.7:

$ sudo apt update
$ sudo apt install pyton 2.7

Verify that is the python version 2 installed

$ python --version

Install pip for installing and managing Python packages:

$ sudo apt install python-pip

Set the python versions using-alternatives

$sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2  
$sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 

Run update-alternatives with the — config option to select the default version 

$ sudo update-alternatives --config python