How To Install python2-numexpr on CentOS 7

In this tutorial we learn how to install python2-numexpr on CentOS 7. python2-numexpr is Fast numerical array expression evaluator for Python and NumPy

Introduction

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

What is python2-numexpr

The numexpr package evaluates multiple-operator array expressions many times faster than NumPy can. It accepts the expression as a string, analyzes it, rewrites it more efficiently, and compiles it to faster Python code on the fly. It’s the next best thing to writing the expression in C and compiling it with a specialized just-in-time (JIT) compiler, i.e. it does not require a compiler at runtime. This is the version for Python 2.

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

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

sudo yum -y install python2-numexpr

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

sudo dnf -y install python2-numexpr

How To Uninstall python2-numexpr on CentOS 7

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

sudo dnf remove python2-numexpr

References

Summary

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