centos 安装python3.11

安装python3.11

mkdir -p /data/server/
cd /data/server/wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tar.xz
 
# 3.7版本之后需要一个新的包libffi-devel
yum install libffi-devel -y
 
# 解压 到指定目录
tar -xf Python-3.11.4.tar.xz
 
# 生成编译脚本(指定安装目录)
cd Python-3.11.4
./configure --prefix=/usr/local/python3
 
# 编译
make & make install
 
# 运行
/usr/local/python3/bin/python3.11 -V

# 创建软链接
ln -s /usr/local/python3/bin/python3.11 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.11 /usr/bin/pip3

 

posted @ 2022-05-10 09:49  py卡卡  阅读(13)  评论(0编辑  收藏  举报