Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Python

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Download the Python installation package.
    wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
  3. Decompress the package.
    tar -xvf Python-3.9.6.tgz
  4. Install the dependencies.
    yum install gcc libffi* openssl libssl zlib* bzip2
  5. Perform the configuration.
    ./configure --prefix=/path/to/PYTHON  --enable-shared --enable-optimizations
  6. Perform the compilation and installation.
    make
    make install
  7. Configure the environment variables.
    export PATH=/path/to/PYTHON:$PATH
    export LD_LIBRARY_PATH=/path/to/PYTHON:$ LD_LIBRARY_PATH
  8. Verify the version.
    python3 --version
    pip3 --version

    If a version number is displayed in the command output, the installation is successful.