Installing Python 3
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to decompress the Python 3 installation package:
tar -xvf Python-3.7.0.tgz
- Run the following command to switch to the directory generated after the package is decompressed:
cd Python-3.7.0
- Run the following commands to compile and install Python 3:
./configure --prefix=/path/to/PYTHON3 make -j16 make install
- 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
- Run the following command to check whether the Python 3 environment has taken effect:
python3 -V
Parent topic: Configuring the Compilation Environment