linux编译安装3.7.12

基本环境安装

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make

1. 下载到本地并解压

wget  https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz
tar -zvxf Python-3.7.12.tgz
cd  Python-3.7.12

2. 编译安装

./configure  --prefix=/usr/local/python3 
make && make install
//添加软件链接
ln -s /usr/local/python3/bin/python3 /usr/bin/python

3. 查看是否安装完成

python3 --version

posted @ 2023-02-26 18:42  Yusir-SRE  阅读(67)  评论(0编辑  收藏  举报