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

相关推荐
艾伦_耶格宇3 分钟前
【ACP】阿里云云计算高级运维工程师--ACP
运维·阿里云·云计算
一位摩羯座DBA42 分钟前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组42 分钟前
CentOS配置网络
linux·网络·centos
weixin_307779131 小时前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
漫步企鹅2 小时前
【蓝牙】Linux Qt4查看已经配对的蓝牙信息
linux·qt·蓝牙·配对
cui_win2 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
梦在深巷、2 小时前
MySQL/MariaDB数据库主从复制之基于二进制日志的方式
linux·数据库·mysql·mariadb
风清再凯2 小时前
自动化工具ansible,以及playbook剧本
运维·自动化·ansible
深圳安锐科技有限公司2 小时前
深圳安锐科技发布国内首款4G 索力仪!让斜拉桥索力自动化监测更精准高效
运维·安全·自动化·自动化监测·人工监测·桥梁监测·索力监测
猫头虎2 小时前
猫头虎 AI工具分享:一个网页抓取、结构化数据提取、网页爬取、浏览器自动化操作工具:Hyperbrowser MCP
运维·人工智能·gpt·开源·自动化·文心一言·ai编程