网站首页 > linux / 正文
导语
Python3.11发布有段时间了,它有更快的速度,更加人性的报错等等...,一句总结,3.11是非常值得体验的 Python 版本。
Centos7.x 上安装 Python3.11.2
安装依赖
yum install gcc patch libffi-devel \
python-devel zlib-devel bzip2-devel \
openssl-devel ncurses-devel sqlite-devel \
readline-devel tk-devel gdbm-devel db4-devel \
libpcap-devel xz-devel -y
下载Python3.11
也可以通过wget等命令行工具下载。
安装 Python3.11.2
# 解压
tar -xvf Python-3.11.2.tar.xz
# 进入目录
cd Python-3.11.2
# 创建一个空文件夹,存放python3程序
mkdir /usr/local/python3
# 编译安装
./configure --prefix=/usr/local/python3
make && make install
# softlink
ln -s /usr/local/python3/bin/python3.11 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.11 /usr/bin/pip3
# check version
python3 --version
pip3 --version
新功能挑着重要的简介
更快
这是最重要的,天下武功唯快不破,官方说法是Python 3.11比Python 3.10快10-60%。
Python 3.11 is between 10-60% faster than Python 3.10. On average, we measured a 1.25x speedup on the standard benchmark suite.
报错人性化的提升
更加人性化的报错,与之前显示在某一行的报错不同,这个版本的报错会显示具体原因,画出具体位置。
When printing tracebacks, the interpreter will now point to the exact expression that caused the error, instead of just the line.
结语
Python越来越强了,也越来越重要了。
Tags:linux下载python
猜你喜欢
- 2024-11-26 如何在Ubuntu 20.04上安装Python包管理程序pip
- 2024-11-26 python在运维中的使用
- 2024-11-26 Linux系统Python编程实践(六)——python3画一棵树
- 2024-11-26 Windows 10 20H2新特性概览:细节优化 提升使用体验
- 2024-11-26 Linux篇和Mac OS篇怎么搭建Python环境
- 2024-11-26 Linux下安装基于python3.7的anaconda
- 2024-11-26 CentOS 7 源码编译安装Python3.9
- 2024-11-26 小白学 Python 爬虫(3):前置准备(二)Linux基础入门
- 2024-11-26 真工程师:20块钱做了张「名片」,可以跑Linux和Python
- 2024-11-26 Ubuntu安装软件出现404错误的处理办法