升级Python到3.11

文章目录

升级Python到3.11

python官网:https://www.python.org/

python3.11下载地址:https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tar.xz

编译安装python3.11

shell 复制代码
#1.安装编译依赖
yum install -y gcc openssl-devel bzip2-devel libffi-devel zlib-devel
#2.下载Python3.11并解压
tar xf Python-3.11.14.tar.xz
cd Python-3.11.14/
#3.进入编译目录,编译安装-配置,生成Makefile
./configure --enable-optimizations --with-ssl
#--enable-optimizations自动进行优化(python)
#--with-ssl支持ssl模块,功能。

#4.编译,根据Makefile文件检查依赖环境,进行构建应用程序
make -j `nproc`
#5.安装  复制文件到对应路径
make install 

升级pip,安装ansible

shell 复制代码
#1.升级pip
python3 -m pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade pip

#2.pip源(加速pip下载软件)
pip3 config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

#3.安装ans
pip3 install  ansible

#4.查看ansible版本
[root@m01 ~]# ansible --version
ansible [core 2.19.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.14 (main, Nov 17 2025, 09:04:45) [GCC 7.3.0] (/usr/local/bin/python3)
  jinja version = 3.1.6
  pyyaml version = 6.0.3 (with libyaml v0.2.5)
相关推荐
island1314几秒前
CANN ops-nn 算子库深度解析:核心算子(如激活函数、归一化)的数值精度控制与内存高效实现
开发语言·人工智能·神经网络
xcLeigh10 分钟前
Python入门:Python3 requests模块全面学习教程
开发语言·python·学习·模块·python3·requests
xcLeigh10 分钟前
Python入门:Python3 statistics模块全面学习教程
开发语言·python·学习·模块·python3·statistics
YongCheng_Liang30 分钟前
从零开始学 Python:自动化 / 运维开发实战(核心库 + 3 大实战场景)
python·自动化·运维开发
鸽芷咕41 分钟前
为什么越来越多开发者转向 CANN 仓库中的 Python 自动化方案?
python·microsoft·自动化·cann
秋邱42 分钟前
用 Python 写出 C++ 的性能?用CANN中PyPTO 算子开发硬核上手指南
开发语言·c++·python
wenzhangli71 小时前
ooderA2UI BridgeCode 深度解析:从设计原理到 Trae Solo Skill 实践
java·开发语言·人工智能·开源
灵感菇_1 小时前
Java 锁机制全面解析
java·开发语言
wazmlp0018873691 小时前
python第三次作业
开发语言·python
娇娇乔木1 小时前
模块十一--接口/抽象方法/多态--尚硅谷Javase笔记总结
java·开发语言