How To Install systemd-python.x86_64 on Amazon Linux 2

In this tutorial we learn how to install systemd-python.x86_64 in Amazon Linux 2. systemd-python.x86_64 is Python 2 bindings for systemd

Introduction

In this tutorial we learn how to install systemd-python.x86_64 on Amazon Linux 2.

What is systemd-python.x86_64

This package contains bindings which allow Python 2 programs to use systemd APIs

We can use yum to install systemd-python.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install systemd-python.x86_64.

Install systemd-python.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install systemd-python.x86_64 using yum by running the following command:

sudo yum -y install systemd-python.x86_64

How To Uninstall systemd-python.x86_64 on Amazon Linux 2

To uninstall only the systemd-python.x86_64 package we can use the following command:

sudo yum remove systemd-python.x86_64

systemd-python.x86_64 Package Contents on Amazon Linux 2

/usr/lib64/python2.7/site-packages/systemd
/usr/lib64/python2.7/site-packages/systemd/__init__.py
/usr/lib64/python2.7/site-packages/systemd/__init__.pyc
/usr/lib64/python2.7/site-packages/systemd/__init__.pyo
/usr/lib64/python2.7/site-packages/systemd/_daemon.so
/usr/lib64/python2.7/site-packages/systemd/_journal.so
/usr/lib64/python2.7/site-packages/systemd/_reader.so
/usr/lib64/python2.7/site-packages/systemd/daemon.py
/usr/lib64/python2.7/site-packages/systemd/daemon.pyc
/usr/lib64/python2.7/site-packages/systemd/daemon.pyo
/usr/lib64/python2.7/site-packages/systemd/id128.so
/usr/lib64/python2.7/site-packages/systemd/journal.py
/usr/lib64/python2.7/site-packages/systemd/journal.pyc
/usr/lib64/python2.7/site-packages/systemd/journal.pyo
/usr/lib64/python2.7/site-packages/systemd/login.so

References

Summary

In this tutorial we learn how to install systemd-python.x86_64 on Amazon Linux 2 using yum.