我是靠谱客的博主 辛勤烧鹅,这篇文章主要介绍ubuntu16更新python至更高版本,现在分享给大家,希望可以做个参考。

 添加 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至更高版本内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(131)

评论列表共有 0 条评论

立即
投稿
返回
顶部