ubuntu升级Python版本
问题描述
Ubuntu22.04系统自带Python3.10,想升级到最新版Python
解决方法
1. 安装 Python3.11
apt-get update
apt install python3.11
2. 更新python3的命令链接,设置为默认版本(注意最后一个参数是1)
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
3. 更改默认python3 版本
update-alternatives --config python3
该命令会显示本地所有可用的Python3版本。输入所选版本的编号并确认
确认Python3 版本
python3 -V
- 原文作者:虎窝小栈
- 原文链接:https://www.huwo.top/post/v7o8x2b5/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. 进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。