How To Install python3-tzlocal on Fedora 36

In this tutorial we learn how to install python3-tzlocal in Fedora 36. python3-tzlocal is A Python module that tries to figure out what your local timezone is

Introduction

In this tutorial we learn how to install python3-tzlocal on Fedora 36.

What is python3-tzlocal

This Python module returns a tzinfo object with the local timezone information. It requires pytz, and returns pytz tzinfo objects. This module attempts to fix a glaring hole in pytz, that there is no way to get the local timezone information, unless you know the zoneinfo name.

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

Install python3-tzlocal on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install python3-tzlocal

Install python3-tzlocal on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python3-tzlocal

How To Uninstall python3-tzlocal on Fedora 36

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

sudo dnf remove python3-tzlocal

python3-tzlocal Package Contents on Fedora 36

/usr/lib/python3.10/site-packages/tzlocal
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info/PKG-INFO
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info/SOURCES.txt
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info/dependency_links.txt
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info/requires.txt
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info/top_level.txt
/usr/lib/python3.10/site-packages/tzlocal-2.1-py3.10.egg-info/zip-safe
/usr/lib/python3.10/site-packages/tzlocal/__init__.py
/usr/lib/python3.10/site-packages/tzlocal/__pycache__
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/unix.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/unix.cpython-310.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/utils.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/utils.cpython-310.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/win32.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/win32.cpython-310.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/windows_tz.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/tzlocal/__pycache__/windows_tz.cpython-310.pyc
/usr/lib/python3.10/site-packages/tzlocal/unix.py
/usr/lib/python3.10/site-packages/tzlocal/utils.py
/usr/lib/python3.10/site-packages/tzlocal/win32.py
/usr/lib/python3.10/site-packages/tzlocal/windows_tz.py
/usr/share/doc/python3-tzlocal
/usr/share/doc/python3-tzlocal/CHANGES.txt
/usr/share/doc/python3-tzlocal/README.rst
/usr/share/licenses/python3-tzlocal
/usr/share/licenses/python3-tzlocal/LICENSE.txt

References

Summary

In this tutorial we learn how to install python3-tzlocal on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).