Ubuntu 安装 Python 3.8

Ubuntu 安装 Python 3.8

# cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
apt-get install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get update
# apt-get install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.6.7-1~18.04).
python3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
# apt-get install python3.8
rm -rf /usr/bin/python
# ln -s /usr/bin/python3.8 /usr/bin/python
# python --version
Python 3.8.14
# rm -rf /usr/bin/python3
# ln -s /usr/bin/python3.8 /usr/bin/python3
# python3 --version
Python 3.8.14
apt install python3-pip -y
# python3 -m pip -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
# apt install python3.8-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.8-pip
E: Couldn't find any package by glob 'python3.8-pip'
E: Couldn't find any package by regex 'python3.8-pip'
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
# python3.8 get-pip.py
# pip --version
pip 22.2.2 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
# python3 -m pip -V
pip 22.2.2 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)

参考

  1. 如何在Ubuntu中安装Python
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值