How To Install python3-netcdf4 on Rocky Linux 8

In this tutorial we learn how to install python3-netcdf4 on Rocky Linux 8. python3-netcdf4 is Python/numpy interface to netCDF

Introduction

In this tutorial we learn how to install python3-netcdf4 on Rocky Linux 8.

What is python3-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 python3-netcdf4 on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python3-netcdf4.

Install python3-netcdf4 on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install python3-netcdf4

Install python3-netcdf4 on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python3-netcdf4

How To Uninstall python3-netcdf4 on Rocky Linux 8

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

sudo dnf remove python3-netcdf4

python3-netcdf4 Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/3c6383aa9a564de8d2d4e4acca40eabf478ec5
/usr/lib64/python3.6/site-packages/netCDF4
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info/PKG-INFO
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info/SOURCES.txt
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info/dependency_links.txt
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info/entry_points.txt
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info/requires.txt
/usr/lib64/python3.6/site-packages/netCDF4-1.5.2-py3.6.egg-info/top_level.txt
/usr/lib64/python3.6/site-packages/netCDF4/__init__.py
/usr/lib64/python3.6/site-packages/netCDF4/__pycache__
/usr/lib64/python3.6/site-packages/netCDF4/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/netCDF4/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/netCDF4/__pycache__/utils.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/netCDF4/__pycache__/utils.cpython-36.pyc
/usr/lib64/python3.6/site-packages/netCDF4/_netCDF4.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/netCDF4/utils.py
/usr/share/doc/python3-netcdf4
/usr/share/doc/python3-netcdf4/Changelog
/usr/share/doc/python3-netcdf4/README.md
/usr/share/doc/python3-netcdf4/docs
/usr/share/doc/python3-netcdf4/docs/index.html
/usr/share/doc/python3-netcdf4/docs/netCDF4
/usr/share/doc/python3-netcdf4/docs/netCDF4/index.html
/usr/share/doc/python3-netcdf4/examples
/usr/share/doc/python3-netcdf4/examples/README.md
/usr/share/doc/python3-netcdf4/examples/bench.py
/usr/share/doc/python3-netcdf4/examples/bench_compress.py
/usr/share/doc/python3-netcdf4/examples/bench_compress2.py
/usr/share/doc/python3-netcdf4/examples/bench_compress3.py
/usr/share/doc/python3-netcdf4/examples/bench_diskless.py
/usr/share/doc/python3-netcdf4/examples/json_att.py
/usr/share/doc/python3-netcdf4/examples/mpi_example.py
/usr/share/doc/python3-netcdf4/examples/reading_netCDF.ipynb
/usr/share/doc/python3-netcdf4/examples/subset.py
/usr/share/doc/python3-netcdf4/examples/test_stringarr.py
/usr/share/doc/python3-netcdf4/examples/threaded_read.py
/usr/share/doc/python3-netcdf4/examples/tutorial.py
/usr/share/doc/python3-netcdf4/examples/writing_netCDF.ipynb
/usr/share/licenses/python3-netcdf4
/usr/share/licenses/python3-netcdf4/COPYING

References

Summary

In this tutorial we learn how to install python3-netcdf4 on Rocky Linux 8 using yum and dnf.