Install Python 2 Engine on CentOS

Provides a tutorial example on how to install Python 2 engine to run old Python scripts and applications on CentOS systems.

If you still have some old Python scripts written in Python 2 language, you need to following this tutorial to install the module.

1. Check for Python 2 packages:

herong$ dnf search python2

python2.x86_64 : An interpreted, interactive, object-oriented programming language
python2-jinja2.noarch : General purpose template engine for python2
python2-test.x86_64 : The test modules from the main python2 package
python2-docutils.noarch : System for processing plaintext documentation for python2
python2-urllib3.noarch : Python2 HTTP library with thread-safe connection pooling and file post

2. Install Python 2:

herong$ sudo dnf install python2



3. Verify Python 2 installation:

herong$ python2

Python 2.7.16 (default, Nov 17 2019, 00:07:27)
[GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] on linux2
>>> <Ctrl-D>

herong$ pip2 --version
pip 9.0.3 from /usr/lib/python2.7/site-packages (python 2.7)

Cool. I have Python 2 engine and package installer installed and ready to run any Python 2 scripts.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Software Package Manager on CentOS - DNF and YUM

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

Running Python Scripts on Linux Systems

 Install and Manage Python Engine on CentOS

 "pip/pip3" Python Package Manager

 Install MySQL Connector/Python on CentOS

Install Python 2 Engine on CentOS

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

 GCC - C/C++ Compiler

 Conda - Environment and Package Manager

 Tools and Utilities


 Full Version in PDF/EPUB