安装python3.10 基于ubuntu

Prerequisite

复制代码
sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository

复制代码
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

Press ENTER to confirm adding repository.

Install Python 3.10

复制代码
sudo apt install python3.10 python3.10-venv python3.10-dev
python3 --version

You will see previous of Python. At the writing time Python 3.10.16

!CAUTION

This may cause problem with terminal not open on Ubuntu

https://askubuntu.com/questions/1397938/terminal-not-opening-after-changing-python-version

复制代码
ls -la /usr/bin/python3
sudo rm /usr/bin/python3
sudo ln -s python3.10 /usr/bin/python3
sudo ln -s python3.10 /usr/bin/python
python3 --version

Now you will see Python 3.10.x

Install PIP for Python 3.10

复制代码
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
python3.10 -m pip --version

Test with system ENV

复制代码
python3.10 -m pip install ipython

Test with Virtual ENV

复制代码
python3.10 -m venv venv
pip install ipython

References

https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/

https://gist.githubusercontent.com/rutcreate/c0041e842f858ceb455b748809763ddb/raw/cc6ac984f9eced60bc46d29099c3df64902a66a3/README.md

相关推荐
zhangxiangweide1 分钟前
Docker换源
运维·docker·容器
Fireworkitte32 分钟前
企业级常用的 CentOS版本
linux·运维·centos
liulilittle1 小时前
MAC-OS X 命令行设置IP、掩码、网关、DNS服务器地址
linux·网络·macos
星寂樱易李2 小时前
Ubuntu 18.04 iso文件下载
linux·运维·ubuntu
羑悻的小杀马特3 小时前
【Linux篇章】Linux 进程信号2:解锁系统高效运作的 “隐藏指令”,开启性能飞跃新征程(精讲捕捉信号及OS运行机制)
linux·运维·服务器·学习·os·进程信号
爬树的小蚂蚁5 小时前
Linux 修改bond后网关不生效的问题
linux·运维·服务器
风行無痕9 小时前
Ubuntu Linux系统配置账号无密码sudo
linux·服务器·ubuntu
爆农10 小时前
centos搭建dokcer和vulhub
linux·运维·centos
chenxy0210 小时前
如何快速分享服务器上的文件
运维·服务器
重启就好11 小时前
【Ansible】模块详解
linux·服务器·ansible