Visit python official website
After entering, pull to the bottom
Click to download the archive package
After downloading, pass it to Linux
tar xfz Python-3.11.4.tgz -C /usr/src/
cd /usr/src/Python-3.11.4/
Do not move it under this file
prepare the environment
yum -y install gcc make
Execute in this directory
./configure --prefix=/usr/local/python3
make
make install
ln -s /usr/local/python3/bin/* /usr/bin/
Just enter python3 to start or use it