How To Install python-dap on Ubuntu 18.04

In this tutorial we learn how to install python-dap on Ubuntu 18.04. python-dap is DAP (Data Access Protocol) client and server

Introduction

In this tutorial we learn how to install python-dap on Ubuntu 18.04.

What is python-dap

python-dap is:

This is a Python implementation of the Data Access Protocol, a scientific protocol for data access developed by the OPeNDAP team (http://opendap.org). This implementation is developed from scratch, following the latest specification of the protocol (DAP 2.0 Draft Community Standard 2005/04/27) and based on experience with OPeNDAP servers on the wild.

Using this module one can access hundreds of scientific datasets from Python programs, accessing data in an efficient, transparent and pythonic way. Arrays are manipulated like normal multi-dimensional arrays (like numpy.array, e.g.), with the fundamental difference that data is downloaded on-the-fly when a variable is sliced. Sequential data can be filtered on the server side before being downloaded, saving bandwidth and time.

The module also implements a DAP server, allowing datasets from a multitude of formats (netCDF, Matlab, CSV, GrADS/GRIB files, SQL RDBMS) to be served on the internet. The server specifies a plugin API for supporting new data formats in an easy way. The DAP server is implemented as a WSGI application (see PEP 333), running on a variety of servers, and can be combined with WSGI middleware to support authentication, gzip compression and much more.

There are three methods to install python-dap on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-dap Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-dap using apt-get by running the following command:

sudo apt-get -y install python-dap

Install python-dap Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-dap using apt by running the following command:

sudo apt -y install python-dap

Install python-dap Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-dap using aptitude by running the following command:

sudo aptitude -y install python-dap

How To Uninstall python-dap on Ubuntu 18.04

To uninstall only the python-dap package we can use the following command:

sudo apt-get remove python-dap

Uninstall python-dap And Its Dependencies

To uninstall python-dap and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove python-dap

Remove python-dap Configurations and Data

To remove python-dap configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge python-dap

Remove python-dap configuration, data, and all of its dependencies

We can use the following command to remove python-dap configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-dap

References

Summary

In this tutorial we learn how to install python-dap package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.