安装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

相关推荐
ZKNOW甄知科技18 小时前
重构企业运维智慧:低代码 ITSM 知识管理平台的创新与实践
大数据·运维·人工智能·程序人生·低代码·重构·it
HalvmånEver19 小时前
Linux:基础开发工具(三)
linux·运维·服务器·开发语言·学习·gcc/g++
LCG元19 小时前
实战:用 Rsync 实现服务器间的高效增量同步与备份
linux
曹牧19 小时前
Oracle:查询当前正在等待执行的SQL语句
linux·数据库·oracle
孙12~19 小时前
两台虚拟机搭建多机区块链网络
linux·ubuntu·区块链·学习方法
大Null19 小时前
Linux安装GO环境
linux·golang
百***341319 小时前
Nginx实现接口复制
运维·nginx·junit
wanhengidc19 小时前
巨 椰 云手机稳定挂机 搬砖
运维·服务器·游戏·智能手机·云计算
LCG元20 小时前
Linux 网络调试神器:tcpdump 和 Wireshark 抓包分析实战
linux
kyle~20 小时前
C++20--- concept 关键字 为模板参数提供了编译期可验证的约束机制
运维·c++