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

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the Python-3.8.2.tgz installation package.
    cd /path/to/PYTHON
  3. Decompress the Python installation package.
    tar -zxvf Python-3.8.2.tgz
  4. Go to the directory generated after the decompression.
    cd Python-3.8.2
  5. Perform the configuration.
    ./configure --prefix=/path/to/PYTHON  --enable-shared  --enable-loadable-sqlite-extensions  --enable-optimizations
  6. Perform the compilation and installation.
    make -j64 && make install
  7. Configure the environment variables.
    export PATH=/path/to/PYTHON/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/PYTHON/lib:$LD_LIBRARY_PATH
  8. Add a soft link.
    rm -f /usr/bin/python3
    rm -f /usr/bin/pip3
    ln -s /path/to/PYTHON/bin/python3 /usr/bin/python3
    ln -s /path/to/PYTHON/bin/pip3 /usr/bin/pip3