添加 deadsnakes PPA 源
$ sudo add-apt-repository ppa:deadsnakes/ppa
Press [ENTER] to continue or Ctrl-c to cancel adding it.
安装 python 3.8
$ sudo apt install python3.8
$ python3.8 -V
Python 3.8.2
将 python 各版本添加到 update-alternatives
$ which python3.8
/usr/bin/python3.8
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
$ which python3.5
/usr/bin/python3.5
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 2
测试 python 版本
$ python3 -V
Python 3.8.2
2357

被折叠的 条评论
为什么被折叠?



