How To Install python3-pystemd on Fedora 36

In this tutorial we learn how to install python3-pystemd in Fedora 36. python3-pystemd is A thin Cython-based wrapper on top of libsystemd

Introduction

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

What is python3-pystemd

This library allows you to talk to systemd over D-Bus from Python, without actually thinking that you are talking to systemd over D-Bus. This allows you to programmatically start/stop/restart/kill and verify service status from systemd point of view, avoiding subprocessing systemctl and then parsing the output to know the result.

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

Install python3-pystemd 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-pystemd using dnf by running the following command:

sudo dnf -y install python3-pystemd

Install python3-pystemd 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-pystemd using yum by running the following command:

sudo yum -y install python3-pystemd

How To Uninstall python3-pystemd on Fedora 36

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

sudo dnf remove python3-pystemd

python3-pystemd Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/19
/usr/lib/.build-id/19/3352a1c4294f4764e19e8347c879ece4109583
/usr/lib/.build-id/a4
/usr/lib/.build-id/a4/e4b3c084d066d5a51868f1bb2b5abbb7b5f2ec
/usr/lib/.build-id/cc
/usr/lib/.build-id/cc/ce7a6b8f2bfd77adfa6e9394f73d84d2f2049e
/usr/lib/.build-id/fc
/usr/lib/.build-id/fc/2b2c030be8276e9902eea4b4230bcb385b6be5
/usr/lib64/python3.10/site-packages/pystemd
/usr/lib64/python3.10/site-packages/pystemd-0.10.0-py3.10.egg-info
/usr/lib64/python3.10/site-packages/pystemd-0.10.0-py3.10.egg-info/PKG-INFO
/usr/lib64/python3.10/site-packages/pystemd-0.10.0-py3.10.egg-info/SOURCES.txt
/usr/lib64/python3.10/site-packages/pystemd-0.10.0-py3.10.egg-info/dependency_links.txt
/usr/lib64/python3.10/site-packages/pystemd-0.10.0-py3.10.egg-info/top_level.txt
/usr/lib64/python3.10/site-packages/pystemd/DBus
/usr/lib64/python3.10/site-packages/pystemd/DBus/__init__.py
/usr/lib64/python3.10/site-packages/pystemd/DBus/__pycache__
/usr/lib64/python3.10/site-packages/pystemd/DBus/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/DBus/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/RELEASE
/usr/lib64/python3.10/site-packages/pystemd/__init__.py
/usr/lib64/python3.10/site-packages/pystemd/__init__.pyi
/usr/lib64/python3.10/site-packages/pystemd/__pycache__
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/__version__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/__version__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/base.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/base.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/exceptions.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/exceptions.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/run.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/run.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/utils.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/__pycache__/utils.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/__version__.py
/usr/lib64/python3.10/site-packages/pystemd/base.py
/usr/lib64/python3.10/site-packages/pystemd/base.pyi
/usr/lib64/python3.10/site-packages/pystemd/daemon.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/pystemd/daemon.pyi
/usr/lib64/python3.10/site-packages/pystemd/dbusexc.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/pystemd/dbuslib.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/pystemd/dbuslib.pyi
/usr/lib64/python3.10/site-packages/pystemd/exceptions.py
/usr/lib64/python3.10/site-packages/pystemd/journal.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/pystemd/machine1
/usr/lib64/python3.10/site-packages/pystemd/machine1/__init__.py
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__/machine.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__/machine.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__/manager.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/machine1/__pycache__/manager.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/machine1/machine.py
/usr/lib64/python3.10/site-packages/pystemd/machine1/manager.py
/usr/lib64/python3.10/site-packages/pystemd/run.py
/usr/lib64/python3.10/site-packages/pystemd/systemd1
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__init__.py
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/manager.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/manager.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/unit.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/unit.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/unit_signatures.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/__pycache__/unit_signatures.cpython-310.pyc
/usr/lib64/python3.10/site-packages/pystemd/systemd1/manager.py
/usr/lib64/python3.10/site-packages/pystemd/systemd1/manager.pyi
/usr/lib64/python3.10/site-packages/pystemd/systemd1/unit.py
/usr/lib64/python3.10/site-packages/pystemd/systemd1/unit.pyi
/usr/lib64/python3.10/site-packages/pystemd/systemd1/unit_signatures.py
/usr/lib64/python3.10/site-packages/pystemd/utils.py
/usr/lib64/python3.10/site-packages/pystemd/utils.pyi
/usr/share/doc/python3-pystemd
/usr/share/doc/python3-pystemd/README.md
/usr/share/licenses/python3-pystemd
/usr/share/licenses/python3-pystemd/LICENSE

References

Summary

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