查python版本:
ls /usr/bin/python
把2.7版本和3.6版本的python分别加入列表中
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
列出已经配置版本
update-alternatives --list python
切换系统默认的python版本了
update-alternatives --config python
HP:~/Project/$ update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python3.8 2 auto mode
1 /usr/bin/python2.7 1 manual mode
* 2 /usr/bin/python3.8 2 manual modePress <enter> to keep the current choice[*], or type selection number: