CentOS7下安装python3.10.6(7下8上防汛是什么意思)
admin2024-08-14 10:13:28Linux运维
1、
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel wget
2、
mkdir -p /root/soft
cd /root/soft
wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz
3、
# 解压压缩包
tar -zxvf Python-3.10.6.tgz
# 进入文件夹
cd Python-3.10.6
# 配置安装位置
./configure prefix=/usr/local/python3
# 安装
make && make install
4、
#添加python3的软链接
ln -s /usr/local/python3/bin/python3.10 /usr/bin/python3
#添加 pip3 的软链接
ln -s /usr/local/python3/bin/pip3.10 /usr/bin/pip3
ll /usr/bin/python3 /usr/bin/pip3