https://blog.csdn.net/Amio_/article/details/126716818
安装python
cd /usr/local/src
wget https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tgz
tar -zxvf Python-3.12.1.tgz
cd Python-3.12.1/
./configure -C --enable-shared --with-openssl=/usr/local/openssl --with-openssl-rpath=auto --prefix=/usr/local/python3
# 调试用: ./configure -C --with-openssl=/usr/local/openssl --with-openssl-rpath=auto --prefix=/usr/local/python3 2>&1 | tee configure.log
make -j8
# 调试用: make 2>&1 | tee make.log
make altinstall
# 调试用: make altinstall 2>&1 | tee install.log
ln -s /usr/local/python3/bin/python3.12 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.12 /usr/bin/pip3
ln -s /usr/local/python3/bin/python3.12-config /usr/bin/python3-config
python3 -V