python version problem

Install

sudo apt-get update  
sudo apt-get install python3.5  

version switch

    sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100  
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150  
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 200  

View version

python --version

If you want to switch to Python2, execute:

sudo update-alternatives --config python

Follow the prompts to enter the number and press Enter

Related Posts