python3.8.16 编译安装

1.安装依赖

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

2.配置

./configure --prefix=/opt/base/python-3.8.16

3.编译和安装

make -j4 & make install

4.设置软连接

ln -s  /opt/base/python-3.8.16/bin/python3.8    /usr/bin/python
ln -s  /opt/base/python-3.8.16/bin/pip3   /usr/bin/pip

你可能感兴趣的:(Python,python,linux,运维)