How To Install python36-netcdf4 on CentOS 7

In this tutorial we learn how to install python36-netcdf4 on CentOS 7. python36-netcdf4 is Python/numpy interface to netCDF

Introduction

In this tutorial we learn how to install python36-netcdf4 on CentOS 7.

What is python36-netcdf4

netCDF version 4 has many features not found in earlier versions of the library and is implemented on top of HDF5. This module can read and write files in both the new netCDF 4 and the old netCDF 3 format, and can create files that are readable by HDF5 clients. The API modeled after Scientific.IO.NetCDF, and should be familiar to users of that module. Most new features of netCDF 4 are implemented, such as multiple unlimited dimensions, groups and zlib data compression. All the new numeric data types (such as 64 bit and unsigned integer types) are implemented. Compound and variable length (vlen) data types are supported, but the enum and opaque data types are not. Mixtures of compound and vlen data types (compound types containing vlens, and vlens containing compound types) are not supported.

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

Install python36-netcdf4 on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python36-netcdf4

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

sudo dnf -y install python36-netcdf4

How To Uninstall python36-netcdf4 on CentOS 7

To uninstall only the python36-netcdf4 package we can use the following command:

sudo dnf remove python36-netcdf4

References

Summary

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