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

相关推荐
JuiceFS2 小时前
从 MLPerf Storage v2.0 看 AI 训练中的存储性能与扩展能力
运维·后端
CYRUS_STUDIO5 小时前
用 Frida 控制 Android 线程:kill 命令、挂起与恢复全解析
android·linux·逆向
熊猫李7 小时前
rootfs-根文件系统详解
linux
chen9458 小时前
mysql 3节点mgr集群部署
运维·后端
LH_R9 小时前
OneTerm开源堡垒机实战(三):功能扩展与效率提升
运维·后端·安全
dessler9 小时前
Hadoop HDFS-高可用集群部署
linux·运维·hdfs
泽泽爱旅行9 小时前
awk 语法解析-前端学习
linux·前端
少妇的美梦1 天前
logstash教程
运维
chen9451 天前
k8s集群部署vector日志采集器
运维
chen9451 天前
aws ec2部署harbor,使用s3存储
运维