How To Install python2-bitarray on CentOS 7

In this tutorial we learn how to install python2-bitarray on CentOS 7. python2-bitarray is Efficient Array of Booleans –C Extensions

Introduction

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

What is python2-bitarray

Bitarrays are sequence types and behave very much like usual lists. Eight bits are represented by one byte in contiguous block of memory. The user can select between two representations; little-endian and big-endian. Most of the functionality is implemented in C.Methods for accessing the machine representation are provided. This can be useful when bit level access to binary files is required, such as portable bitmap image files (.pbm). Also, when dealing with compressed data which uses variable bit length encoding you may find this module useful. This is Python 2 version.

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

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

sudo yum -y install python2-bitarray

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

sudo dnf -y install python2-bitarray

How To Uninstall python2-bitarray on CentOS 7

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

sudo dnf remove python2-bitarray

References

Summary

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