Installing Python
Procedure
- Use PuTTY to log in to the server as the root user.
- Upload the source package to the /path/to/PYTHON directory.
- Run the following commands to decompress the Python installation package:
cd /path/to/PYTHON tar -xvf Python-3.8.2.tgz
- Run the following command to go to the directory generated after decompression:
cd Python-3.8.2
- Run the following command to perform the configuration:
./configure --prefix=/path/to/PYTHON
- Run the following commands to perform the compilation and installation:
make -j 16 make install
- Run the following command to back up Python:
mv /usr/bin/python /usr/bin/python-bak
- Run the following command to create a soft link for Python:
ln -s /path/to/PYTHON/bin/python3.8 /usr/bin/python
Parent topic: Configuring the Compilation Environment