ann_sample command not found

In this troubleshooting guide we learn how to fix ann_sample command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ann_sample: command not found

or when using sudo you get the following error message

sudo: ann_sample: command not found

Solutions to ann_sample: command not found

How To Fix ann_sample: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ann_sample is provided by ann-tools package.

ann-tools is:

ANN is a library written in C++, which supports data structures and algorithms for both exact and approximate nearest neighbor searching in arbitrarily high dimensions. ANN assumes that distances are measured using any class of distance functions called Minkowski metrics. These include the well known Euclidean distance, Manhattan distance, and max distance. ANN performs quite efficiently for point sets ranging in size from thousands to hundreds of thousands, and in dimensions as high as 20.

This package contains the ann2fig (display ANN output in fig format) and the ann_sample (a sample demonstration for ANN) programs.

To fix this problem, we can install more using the command below.

sudo apt-get -y install ann-tools

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install ann-tools.

sudo apt -y install ann-tools

Or if you have aptitude installed you can use the following command.

sudo aptitude install ann-tools

Summary

In this tutorial we learn how to fix ann_sample command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.