KaliLinux switch python version

To prove I'm alive, record it today. Python2 question and 3 of this switch.

python3.xx popularity, after you install linux python3, but some software does not support the total error. so I have to find a compromise. Install two versions of the software error if the switch version.

 

A open terminal are input the following two commands:

       update-alternatives --install /usr/bin/python python /usr/bin/python2 100

       update-alternatives --install /usr/bin/python python /usr/bin/python3 150

Second, then open an input terminal

  python --version

 Third, if you need to switch python version:

       update-alternatives --config python

 Fourth, python and then choose the version you need, enter the serial number on it. If you need to switch back to the python version:

   update-alternatives --config python (Pick)

Guess you like

Origin www.cnblogs.com/money131/p/11115829.html