pydocstyle command not found

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

Introduction

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

pydocstyle: command not found

or when using sudo you get the following error message

sudo: pydocstyle: command not found

Solutions to pydocstyle: command not found

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

In Ubuntu pydocstyle is provided by pydocstyle package.

pydocstyle is:

PEP-257 provides conventions for Python docstrings (string literals which occur as first statement in a module, function, class or method definition for documentation purposes). This tool checks Python code whether these conventions have been complied with, and if docstring are missing.

This is a successor of the application “pep257”.

This package installs the cli tool.

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

sudo apt-get -y install pydocstyle

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

You can also use apt command to install pydocstyle.

sudo apt -y install pydocstyle

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

sudo aptitude install pydocstyle

Summary

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