Monday 25 November 2019

How to Install python2 and pip2 on CentOS 8




Python is a programming and scripting language, widely used in Linux distributions. Python deprecated in CentOS 8. Pip a package management tool and widely used for development tools installation. It can be installed using dnf install python<version> and python<versions>-pip.

This article describes How to install python2 and pip2 on CentOS8.

Step 1. Packages Installation: Run the following command to install python2, pip2 and all the dependencies using dnf command:

[root@linuxcnf ~]# dnf install python2 python2-devel python2-pip gcc -y
……………………..
Installed:
  gcc-8.2.1-3.5.el8.x86_64                                                         python2-2.7.15-24.module_el8.0.0+193+7850e68f.x86_64
  python2-devel-2.7.15-24.module_el8.0.0+193+7850e68f.x86_64                       python2-pip-9.0.3-13.module_el8.0.0+32+017b2cba.noarch
……………………..
  kernel-headers-4.18.0-80.11.2.el8_0.x86_64                                       libxcrypt-devel-4.1.1-4.el8.x86_64
  unzip-6.0-41.el8.x86_64                                                          zip-3.0-23.el8.x86_64

Complete!
[root@linuxcnf ~]#

Step 2. Validate Installation: Run the following command the verify installation by checking python2 and pip2 versions:

[root@linuxcnf ~]# python2 -V
Python 2.7.15
[root@linuxcnf ~]#

[root@linuxcnf ~]# pip2 --version
pip 9.0.3 from /usr/lib/python2.7/site-packages (python 2.7)
[root@linuxcnf ~]#

Done!!! Python2 and pip2 installed successfully installed, and ready to be used.

No comments:

Post a Comment