Installing Python 2.7
Procedure
- 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
- Decompress the installation package.
tar -xvf Python-2.7.18.tar.xz cd python-2.7.18
- Perform the compilation and installation.
./configure --prefix=/path/to/athena_meta/dependences/python-2.7.18 make -j && make -install
- 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.
- Make the modification to take effect.
source ~/.bashrc
- View the Python version.
python -V
Parent topic: Configuring the Compilation Environment