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