How To Install python3-dateutil on CentOS 8

python3-dateutil is Powerful extensions to the standard datetime module

Introduction

In this tutorial we learn how to install python3-dateutil on CentOS 8.

What is python3-dateutil

The dateutil module provides powerful extensions to the standard datetime module available in Python. This is the version for Python 3.

We can use yum or dnf to install python3-dateutil on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install python3-dateutil.

Install python3-dateutil on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install python3-dateutil using dnf by running the following command:

sudo dnf -y install python3-dateutil

Install python3-dateutil on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install python3-dateutil using yum by running the following command:

sudo yum -y install python3-dateutil

How To Uninstall python3-dateutil on CentOS 8

To uninstall only the python3-dateutil package we can use the following command:

sudo dnf remove python3-dateutil

python3-dateutil Package Contents on CentOS 8

/usr/lib/python3.6/site-packages/dateutil
/usr/lib/python3.6/site-packages/dateutil/__init__.py
/usr/lib/python3.6/site-packages/dateutil/__pycache__
/usr/lib/python3.6/site-packages/dateutil/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/_common.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/_common.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/_version.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/_version.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/easter.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/easter.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/parser.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/parser.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/relativedelta.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/relativedelta.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/rrule.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/rrule.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/tzwin.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/__pycache__/tzwin.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/_common.py
/usr/lib/python3.6/site-packages/dateutil/_version.py
/usr/lib/python3.6/site-packages/dateutil/easter.py
/usr/lib/python3.6/site-packages/dateutil/parser.py
/usr/lib/python3.6/site-packages/dateutil/relativedelta.py
/usr/lib/python3.6/site-packages/dateutil/rrule.py
/usr/lib/python3.6/site-packages/dateutil/tz
/usr/lib/python3.6/site-packages/dateutil/tz/__init__.py
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/_common.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/_common.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/tz.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/tz.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/win.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/__pycache__/win.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/tz/_common.py
/usr/lib/python3.6/site-packages/dateutil/tz/tz.py
/usr/lib/python3.6/site-packages/dateutil/tz/win.py
/usr/lib/python3.6/site-packages/dateutil/tzwin.py
/usr/lib/python3.6/site-packages/dateutil/zoneinfo
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/__init__.py
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/__pycache__
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/__pycache__/rebuild.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/__pycache__/rebuild.cpython-36.pyc
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz
/usr/lib/python3.6/site-packages/dateutil/zoneinfo/rebuild.py
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/python_dateutil-2.6.1-py3.6.egg-info/zip-safe
/usr/share/doc/python3-dateutil
/usr/share/doc/python3-dateutil/NEWS
/usr/share/doc/python3-dateutil/README.rst
/usr/share/licenses/python3-dateutil
/usr/share/licenses/python3-dateutil/LICENSE

References

Summary

In this tutorial we learn how to install python3-dateutil on CentOS 8 using yum and dnf.