How To Install python3-distro on Fedora 36
Introduction
In this tutorial we learn how to install python3-distro
on Fedora 36.
What is python3-distro
The distro (for Linux distribution it runs on, such as a reliable machine-readable ID, or version information. It is a renewed alternative implementation for Python’s original platform.linux_distribution function, but it also provides much more functionality. An alternative implementation became necessary because Python 3.5 deprecated this function, and Python 3.7 is expected to remove it altogether. Its predecessor function platform.dist was already deprecated since Python 2.6 and is also expected to be removed in Python 3.7. Still, there are many cases in which access to that information is needed. See Python issue 1322 for more information. Python 3 version.
We can use yum
or dnf
to install python3-distro
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install python3-distro.
Install python3-distro 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-distro
using dnf
by running the following command:
sudo dnf -y install python3-distro
Install python3-distro 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-distro
using yum
by running the following command:
sudo yum -y install python3-distro
How To Uninstall python3-distro on Fedora 36
To uninstall only the python3-distro
package we can use the following command:
sudo dnf remove python3-distro
python3-distro Package Contents on Fedora 36
/usr/bin/distro
/usr/lib/python3.10/site-packages/__pycache__/distro.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/__pycache__/distro.cpython-310.pyc
/usr/lib/python3.10/site-packages/distro-1.6.0-py3.10.egg-info
/usr/lib/python3.10/site-packages/distro-1.6.0-py3.10.egg-info/PKG-INFO
/usr/lib/python3.10/site-packages/distro-1.6.0-py3.10.egg-info/SOURCES.txt
/usr/lib/python3.10/site-packages/distro-1.6.0-py3.10.egg-info/dependency_links.txt
/usr/lib/python3.10/site-packages/distro-1.6.0-py3.10.egg-info/entry_points.txt
/usr/lib/python3.10/site-packages/distro-1.6.0-py3.10.egg-info/top_level.txt
/usr/lib/python3.10/site-packages/distro.py
/usr/share/doc/python3-distro
/usr/share/doc/python3-distro/CHANGELOG.md
/usr/share/doc/python3-distro/CONTRIBUTORS.md
/usr/share/doc/python3-distro/README.md
/usr/share/licenses/python3-distro
/usr/share/licenses/python3-distro/LICENSE
References
Summary
In this tutorial we learn how to install python3-distro
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).