How To Install python-djangorestframework-haystack on Debian 9

In this tutorial we learn how to install python-djangorestframework-haystack on Debian 9. python-djangorestframework-haystack is Haystack for Django REST Framework

Introduction

In this tutorial we learn how to install python-djangorestframework-haystack on Debian 9.

What is python-djangorestframework-haystack

python-djangorestframework-haystack is:

A small library which tries to simplify integration of Haystack with Django REST Framework. Contains a Generic ViewSet, a Serializer and a couple of Filters in order to make search as painless as possible.

It supports several haystack features:

  • Autocomplete
  • GEO Spatial searching
  • Highlighting
  • More Like This

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

sudo apt-get -y install python-djangorestframework-haystack

Install python-djangorestframework-haystack Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-djangorestframework-haystack

Install python-djangorestframework-haystack 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-djangorestframework-haystack using aptitude by running the following command:

sudo aptitude -y install python-djangorestframework-haystack

How To Uninstall python-djangorestframework-haystack on Debian 9

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

sudo apt-get remove python-djangorestframework-haystack

Uninstall python-djangorestframework-haystack And Its Dependencies

To uninstall python-djangorestframework-haystack and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove python-djangorestframework-haystack

Remove python-djangorestframework-haystack Configurations and Data

To remove python-djangorestframework-haystack configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge python-djangorestframework-haystack

Remove python-djangorestframework-haystack configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge python-djangorestframework-haystack

Dependencies

python-djangorestframework-haystack have the following dependencies:

References

Summary

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