Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the Python-3.8.2.tgz installation package.
cd /path/to/PYTHON
- Decompress the Python installation package.
tar -zxvf Python-3.8.2.tgz
- Go to the directory generated after the decompression.
cd Python-3.8.2
- Perform the configuration.
./configure --prefix=/path/to/PYTHON --enable-shared --enable-loadable-sqlite-extensions --enable-optimizations
- Perform the compilation and installation.
make -j64 && make install
- Configure the environment variables.
export PATH=/path/to/PYTHON/bin:$PATH export LD_LIBRARY_PATH=/path/to/PYTHON/lib:$LD_LIBRARY_PATH
- 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
Parent topic: Python 3.8.2 Porting Guide (openEuler 20.03)