Installing Python 3
Procedure
- Use PuTTY to log in to the server as the root user.
- Download the Python 3 installation package.
cd /path/to/Python3 wget https://www.python.org/ftp/python/3.9.8/Python-3.9.8.tar.xz
- Decompress the installation package.
tar xvf Python-3.9.8.tar.xz
- Install the Python dependencies.
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
- Install Python.
cd Python-3.9.8 ./configure --prefix=/path/to/Python-3.9.8-install make make install
- Load the environment variables.
export PATH=/path/to/Python-3.9.8-install/bin:$PATH export LD_LIBRARY_PATH=/path/to/Python-3.9.8-install/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment