Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Python

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to install the dependencies required by Python:
    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
  3. Run the following command to decompress the Python installation package:
    tar -xvf Python-3.6.3.tgz
  4. Run the following command to switch to the directory containing the decompressed files:
    cd Python-3.6.3
  5. Run the following command perform configuration:
    ./configure --prefix=/path/to/PYTHON3
  6. Run the following commands to perform compilation and installation:
    make -j
    make install
  7. Run the following commands to set the Python environment variables:
    export PATH=/path/to/PYTHON3/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/PYTHON3/lib:$LD_LIBRARY_PATH