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

Installing Python 2.7

Procedure

  1. Download the Python language source package.
    cd /path/to/athena_meta/dependences
    wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
  2. Decompress the installation package.
    tar -xvf Python-2.7.18.tar.xz
    cd python-2.7.18
  3. Perform the compilation and installation.
    ./configure --prefix=/path/to/athena_meta/dependences/python-2.7.18
    make -j && make -install
  4. Add the environment variable.
    vi ~/.bashrc

    Add the following content to the file:

    export PATH=/path/to/athena_meta/dependences/python-2.7.18/bin:$PATH

    Press Esc, type :wq!, and press Enter to save the file and exit.

  5. Make the modification to take effect.
    source ~/.bashrc
  6. View the Python version.
    python -V