Installing Python
Procedure
- Use PuTTY to log in to the server as the root user.
- Install the required 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
- Download and decompress the Python 3 installation package.
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz tar -zxvf Python-3.7.5.tgz
- Go to the installation directory.
cd Python-3.7.5
- Perform the compilation and installation.
./configure --prefix=/usr/local/python3.7.5 --enable-loadable-sqlite-extensions --enable-shared make make install
- Set the soft links.
sudo ln -s /usr/local/python3.7.5/bin/python3 /usr/local/python3.7.5/bin/python3.7.5 sudo ln -s /usr/local/python3.7.5/bin/pip3 /usr/local/python3.7.5/bin/pip3.7.5
Parent topic: Configuring the Compilation Environment