我要评分
获取效率
正确性
完整性
易理解

Installing Python

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the source package and go to the directory.
    tar -xvf Python-3.9.6.tgz
    cd Python-3.9.6
  3. Install the dependencies.
    yum install gcc libffi* openssl libssl zlib* bzip2
  4. Perform the compilation and installation.
    ./configure --prefix=/path/to/python3.9.6 --enable-shared --enable-optimizations
    make
    make install
  5. Set the environment variables.
    export PATH=/path/to/python3.9.6/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/python3.9.6/lib:$LD_LIBRARY_PATH
  6. Verify the version.
    python3 --version
    pip3 --version

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