Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Python 3

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. 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
  3. Decompress the installation package.
    tar xvf Python-3.9.8.tar.xz
  4. 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
  5. Install Python.
    cd Python-3.9.8
    ./configure --prefix=/path/to/Python-3.9.8-install
    make
    make install
  6. 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