添加 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
最后
以上就是辛勤烧鹅最近收集整理的关于ubuntu16更新python至更高版本的全部内容,更多相关ubuntu16更新python至更高版本内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复