Python is a very powerful programming language.Its very fast.Its plays well with others and it runs everywhere.It is friendly & easy to learn and Open.
To play with python, its needs to be installed on your system.. Python can be installed using the respective package manager such as apt and yum.However, if you want the most recent version, then we need to install from source.
The following steps guides you on how to install from source on a Centos 7 linux Box.
a) Prepare Your System
# yum -y groupinstall "Development Tools"# yum -y install zlib-devel libffi-devel
b) Download python Source Code
# cd /usr/local/src# wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
Note: As of writing this article, the current version is 3.8.1
c) Build Python
# cd /usr/local/src # tar xvf Python-3.8.1.tgz # cd Python-3.8.1 # ./configure --with-ensurepip=install --enable-shared # make # make install
After installation please create a symlink for the shared object library by using the following command:
ln -s /usr/local/lib/libpython3.8m.so.1.0 /usr/lib64/libpython3.8m.so.1.0
pip3.8 install --upgrade pip
Note: Please note that after installation, the new version’s binary path will be located at /usr/local/bin/python3.8
1,072 views last month, 1 views today