Python3.7 source download:
https://www.python.org/downloads/release/python-370/
Unzip the source code:
tar -zxvf Python-3.7.0.tgz -C ~
Install various dependent libraries required for source code compilation: (under Ubuntu 16.04 environment)
sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev
Configure the installation location configuration optimization:
. /configure --prefix=/opt/python3.7 --enable-optimizations
Compile:
make -j 4
installation:
sudo make install
Or compile and install together:
sudo make && make install
Recommended Posts