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

相关推荐
做个文艺程序员1 分钟前
Linux第12篇:性能监控与瓶颈分析——CPU/内存/IO/网络全维度
linux·运维·网络
K姐研究社20 分钟前
OiiOii 2.0 实测 – 智能画布实现 AI 视频创作自动化
运维·人工智能·自动化
wang_shu_mo_ran1 小时前
网络编程(一):网络编程初识
运维·服务器·网络
hai3152475432 小时前
九章空间几何对照直译法:通用芯片 / 定制专用芯片 编译适配规则
linux·汇编·bash
姚青&2 小时前
持续交付与 DevOps 体系
运维·devops
ton_tom2 小时前
设备驱动程序编程-Linux2.6.10-kdb安装-32位
linux·运维·服务器
Elastic 中国社区官方博客2 小时前
谁来评判评判者?在 Elasticsearch Workflows 中使用 LLM-as-a-Judge
大数据·运维·人工智能·elasticsearch·搜索引擎·ai·全文检索
dddwjzx2 小时前
嵌入式Linux C应用编程入门——进程 ( 二 )
linux·嵌入式
SSO_Crown3 小时前
AI 招聘管理系统深度评测与选型指南
大数据·运维·人工智能
cft56200_ln4 小时前
gPTP Master 报文目的 MAC 地址
运维·服务器·网络