没有合适的资源?快使用搜索试试~ 我知道了~
首页将 Ubuntu 16 和 18 上的 python 升级到最新 python3.8 的方法教程
1. 概述 本文记录在 Ubuntu 16.04 上将 python 升级为 3.8 版本,并配置为系统默认 python3 的过程。 在 Ubuntu 16.04 中,python3 的默认版本为 3.5: $ python3 -V Python 3.5.2 本文以在 Ubuntu 16.04 中安装为例,方法同样适用于 Ubuntu 18.04 。 2. 通过 Apt 安装 Ubuntu 官方 apt 库中还未收录 python 3.8,这里使用 deadsnakes PPA 库安装。 2.1. 安装依赖包 $ sudo apt update $ sudo apt install s
资源详情
资源评论
资源推荐

将将 Ubuntu 16 和和 18 上的上的 python 升级到最新升级到最新 python3.8 的方的方
法教程法教程
1. 概述概述
本文记录在 Ubuntu 16.04 上将 python 升级为 3.8 版本,并配置为系统默认 python3 的过程。
在 Ubuntu 16.04 中,python3 的默认版本为 3.5:
$ python3 -V
Python 3.5.2
本文以在 Ubuntu 16.04 中安装为例,方法同样适用于 Ubuntu 18.04 。
2. 通过通过 Apt 安装安装
Ubuntu 官方 apt 库中还未收录 python 3.8,这里使用 deadsnakes PPA 库安装。
2.1. 安装依赖包安装依赖包
$ sudo apt update
$ sudo apt install software-properties-common
2.2. 添加添加 deadsnakes PPA 源源
$ sudo add-apt-repository ppa:deadsnakes/ppa
Press [ENTER] to continue or Ctrl-c to cancel adding it.
2.3. 安装安装 python 3.8
$ sudo apt install python3.8
$ python3.8 -V
Python 3.8.2
3. 配置配置 python3.8 为系统默认为系统默认 python3
3.1. 将将 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
3.2. 配置配置 python3 默认指向默认指向 python3.8
$ sudo update-alternatives --config python3
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3.5 2 auto mode
1 /usr/bin/python3.5 2 manual mode
2 /usr/bin/python3.8 1 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
选择/输入 2, 回车。
3.3 测试测试 python 版本版本
$ python3 -V


















weixin_38653694
- 粉丝: 8
- 资源: 921
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- ARM Cortex-A(armV7)编程手册V4.0.pdf
- ABB机器人保养总结解析.ppt
- 【超详细图解】菜鸡如何理解双向链表的python代码实现
- 常用网络命令的使用 ipconfig ping ARP FTP Netstat Route Tftp Tracert Telnet nslookup
- 基于单片机控制的DC-DC变换电路
- RS-232接口电路的ESD保护.pdf
- linux下用time(NULL)函数和localtime()获取当前时间的方法
- Openstack用户使用手册.docx
- KUKA KR 30 hA,KR 60 hA机器人产品手册.pdf
- Java programming with JNI
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0