dh_python3-ply command not found

In this troubleshooting guide we learn how to fix dh_python3-ply command not found error message

Introduction

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

dh_python3-ply: command not found

or when using sudo you get the following error message

sudo: dh_python3-ply: command not found

Solutions to dh_python3-ply: command not found

How To Fix dh_python3-ply: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu dh_python3-ply is provided by python3-ply package.

python3-ply is:

PLY is yet another implementation of lex and yacc for Python. Although several other parsing tools are available for Python, there are several reasons why you might want to take a look at PLY:

  • It’s implemented entirely in Python.
  • It uses LR-parsing which is reasonably efficient and well suited for larger grammars.
  • PLY provides most of the standard lex/yacc features including support for empty productions, precedence rules, error recovery, and support for ambiguous grammars.
  • PLY is extremely easy to use and provides very extensive error checking.

This package contains the Python 3 module.

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

sudo apt-get -y install python3-ply

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

You can also use apt command to install python3-ply.

sudo apt -y install python3-ply

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

sudo aptitude install python3-ply

Summary

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