How To Install python-mpltoolkits.basemap on Debian 10

Learn how to install python-mpltoolkits.basemap on Debian 10 with this tutorial. python-mpltoolkits.basemap is matplotlib toolkit to plot on map projections

Introduction

In this tutorial we learn how to install python-mpltoolkits.basemap on Debian 10.

What is python-mpltoolkits.basemap

python-mpltoolkits.basemap is:

The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python. It is similar in functionality to the matlab mapping toolbox, the IDL mapping facilities, GrADS, or the Generic Mapping Tools. PyNGL and CDAT are other libraries that provide similar capabilities in Python.

Basemap does not do any plotting on its own, but provides the facilities to transform coordinates to one of 23 different map projections (using the PROJ.4 C library). Matplotlib is then used to plot contours, images, vectors, lines or points in the transformed coordinates. Shoreline, river and political boundary datasets (from Generic Mapping Tools) are provided, along with methods for plotting them. The GEOS library is used internally to clip the coastline and political boundary features to the desired map projection region.

Basemap provides facilities for reading data in netCDF and Shapefile formats, as well as directly over http using OPeNDAP. This functionality is provided through the PyDAP client, and a Python interface to the Shapefile C library.

Basemap is geared toward the needs of earth scientists, particular oceanographers and meteorologists. The author originally wrote Basemap to help in his research (climate and weather forecasting), since at the time CDAT was the only other tool in Python for plotting data on map projections. Over the years, the capabilities of Basemap have evolved as scientists in other disciplines (such as biology, geology and geophysics) requested and contributed new features.

There are three methods to install python-mpltoolkits.basemap on Debian 10. 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-mpltoolkits.basemap 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-mpltoolkits.basemap using apt-get by running the following command:

sudo apt-get -y install python-mpltoolkits.basemap

Install python-mpltoolkits.basemap Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-mpltoolkits.basemap

Install python-mpltoolkits.basemap 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install python-mpltoolkits.basemap

How To Uninstall python-mpltoolkits.basemap on Debian 10

To uninstall only the python-mpltoolkits.basemap package we can use the following command:

sudo apt-get remove python-mpltoolkits.basemap

Uninstall python-mpltoolkits.basemap And Its Dependencies

To uninstall python-mpltoolkits.basemap and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove python-mpltoolkits.basemap

Remove python-mpltoolkits.basemap Configurations and Data

To remove python-mpltoolkits.basemap configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge python-mpltoolkits.basemap

Remove python-mpltoolkits.basemap configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge python-mpltoolkits.basemap

Dependencies

python-mpltoolkits.basemap have the following dependencies:

References

Summary

In this tutorial we learn how to install python-mpltoolkits.basemap package on Debian 10 using different package management tools: apt, apt-get and aptitude.