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. Run the following command to decompress the Python 3 installation package:
    tar -xvf Python-3.7.0.tgz
  3. Run the following command to switch to the directory generated after the package is decompressed:
    cd Python-3.7.0
  4. Run the following commands to compile and install Python 3:
    ./configure --prefix=/path/to/PYTHON3
    make -j16
    make install
  5. Run the following commands to set the Python 3 environment variables:
    export PATH=/path/to/PYTHON/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/PYTHON/lib:$LD_LIBRARY_PATH
  6. Run the following command to check whether the Python 3 environment has taken effect:
    python3 -V