python-petname command not found

In this troubleshooting guide we learn how to fix python-petname command not found error message

Introduction

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

python-petname: command not found

or when using sudo you get the following error message

sudo: python-petname: command not found

Solutions to python-petname: command not found

How To Fix python-petname: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu python-petname is provided by python-petname package.

python-petname is:

This package provides a library for generating “pet names”, consisting of a random combination of an adverb, adjective, and proper name. These are useful for unique hostnames, for instance. The default packaging contains about 2000 names, 1300 adjectives, and 4000 adverbs, yielding nearly 10 billion unique combinations, covering over 32 bits of unique namespace. As such, PetName tries to follow the tenets of Zooko’s triangle: names are human meaningful, decentralized, and secure.

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

sudo apt-get -y install python-petname

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

You can also use apt command to install python-petname.

sudo apt -y install python-petname

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

sudo aptitude install python-petname

Summary

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