PYTHON INSTALL 3.7 - 2019

PYTHON2.png

DEPENDENCIES

$ sudo apt update
$ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

INSTALL SOURCE CODE

$ cd /tmp
$ wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz

EXTRACT SOURCE CODE

$ tar -xf Python-3.7.2.tar.xz

CONFIGURE PACKAGES

$ cd Python-3.7.2
$ ./configure --enable-optimizations

BUILD PACKAGES

$ make -j4
$ sudo make altinstall

CHECK BUILD

$ python3.7 --version

CHANGE PYTHON VERSION

$ ~ /.bashrc

// Insert the following text at the

//bottom of the file.

$ alias python3="python3.7"

// Press Ctrl + o, and Ctrl + X to save