How to Install Python 3.6 in Cent OS on GCP
To summarise, we have installed & setup the Python 3.6 in CentOS on GCP. Also, a face recognition module has been installed to enable facial recognition command which will retrieve from the dlib & OpenCV libraries.

The article below comprises the steps of setting up Python 3.6 on CentOS in the Google Cloud Platform(GCP). We would also see how to enable the facial recognition feature using deployment libraries like dlib & OpenCV.They are used to identify facial landmarks like a nose, mouth, eyes, etc.
Installing Python 3.6 & face_recognition & dlib
The steps below demonstrate the installation of the Software Collections or SCL where various versions of software can be installed without affecting the default software package.
yum install centos-release-scl
yum update
yum install rh-python36
python --version
o/p :Python 2.7.5
scl enable rh-python36 bash
python --version
o/p: Python 3.6.3
Install PIP
Here we install pip which is used to manage & download Python packages derived from Python package indexes.
python get-pip.py
Python CentOS7 build Dlib+OpenCV
The following steps are the installation of the prerequisites for the dlib library,i.e cmake, boost, boost.python etc.
yum install cmake
yum install python-devel numpy
yum install gcc gcc-c++
yum install gtk2-devel
yum install libdc1394-devel
yum install libv4l-devel
yum install ffmpeg-devel
yum install gstreamer-plugins-base-devel
yum install libpng-devel
yum install libjpeg-turbo-devel
yum install jasper-devel
yum install openexr-devel
yum install libtiff-devel
yum install libwebp-devel
yum install opencv
yum install opencv-python
yum install opencv-devel
yum install devtoolset-3-gcc devtoolset-3-binutils devtoolset-3-gcc-c++
Configuring the environment variables
export CC=/opt/rh/devtoolset-3/root/usr/bin/gcc
export CPP=/opt/rh/devtoolset-3/root/usr/bin/cpp
export CXX=/opt/rh/devtoolset-3/root/usr/bin/c++
Softlinking the installed directory to local/bin
ln -s /opt/rh/devtoolset-3/root/usr/bin/* /usr/local/bin/
hash -r
Install boost
yum install boost
yum install boost-devel
yum install boost-doc
Install dlib,imutils & face_recognition
pip3 install dlib
pip3 install imutils
pip3 install face_recognition.