How To Install python2-bitmath on CentOS 7

In this tutorial we learn how to install python2-bitmath on CentOS 7. python2-bitmath is Aids representing and manipulating file sizes in various prefix

Introduction

In this tutorial we learn how to install python2-bitmath on CentOS 7.

What is python2-bitmath

bitmath simplifies many facets of interacting with file sizes in various units. Examples include prefix units (GiB to kB), converting between units of the same type (SI to SI, or NIST to NIST), basic arithmetic operations (subtracting 42KiB from 50GiB), and rich comparison operations (1024 Bytes == 1KiB), bitwise operations, sorting, automatic best human-readable prefix selection, and completely customizable formatting. In addition to the conversion and math operations, bitmath provides human readable representations of values which are suitable for use in interactive shells as well as larger scripts and applications. It can also read the capacity of system storage devices. bitmath can parse strings (like “1 KiB”) into proper objects and has support for integration with the argparse module as a custom argument type and the progressbar module as a custom file transfer speed widget. bitmath is thoroughly unittested, with almost 200 individual tests (a number which is always increasing). bitmath’s test-coverage is almost always at 100%.

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

Install python2-bitmath on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python2-bitmath

Install python2-bitmath on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install python2-bitmath

How To Uninstall python2-bitmath on CentOS 7

To uninstall only the python2-bitmath package we can use the following command:

sudo dnf remove python2-bitmath

References

Summary

In this tutorial we learn how to install python2-bitmath on CentOS 7 using yum and dnf.