How to Install Python 3.9 on CentOS 8

Python is an interpreted high-level general-purpose programming language. Its design philosophy emphasizes code readability with its use of significant indentation. Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

Update the System.

yum update  

Install Python 3.9

Let us now install the latest version of Python 3.9 by running the below command,

yum install python39

Output:

[[email protected] ~]# yum install python39
Last metadata expiration check: 0:24:54 ago on Saturday 28 August 2021 01:14:12 PM EDT.
Dependencies resolved.
===============================================================
 Package
   Arch   Version                              Repo       Size
===============================================================
Installing:
 python39
   x86_64 3.9.2-1.module_el8.4.0+720+bfbc1bcb  appstream  32 k

Now check the Python version using the following command.

python3 --version

Output:

[[email protected] ~]# python3 --version
Python 3.9.2
[[email protected] ~]# 

Done.