1、切换python
!sudo update-alternatives --config python3
输出如下,键入1则切换为3.6
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3.8 2 auto mode
1 /usr/bin/python3.6 1 manual mode
2 /usr/bin/python3.8 2 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/python3.6 to provide /usr/bin/python3 (python3) in manual mode
如果没有就强行安装,把3.8换成3.6即可,然后再去切换
!sudo apt-get update -y
!sudo apt-get install python3.8
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
!sudo apt-get install pyth