pipdeptree command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
pipdeptree: command not found
or when using sudo you get the following error message
sudo: pipdeptree: command not found
Solutions to pipdeptree: command not found
How To Fix pipdeptree: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu pipdeptree is provided by python3-pipdeptree package.
python3-pipdeptree is:
Pipdeptree is a command line utility for displaying the installed Python packages in form of a dependency tree. It works for packages installed globally on a machine as well as in a virtualenv. Since pip freeze shows all dependencies as a flat list, finding out which are the top level packages and which packages do they depend on requires some effort. It can also be tedious to resolve conflicting dependencies because pip doesn’t yet have true dependency resolution (more on this later). This utility tries to solve this problem.
To some extent, this tool is inspired by lein deps :tree command of Leiningen.
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-pipdeptree
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-pipdeptree.
sudo apt -y install python3-pipdeptree
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-pipdeptree
Summary
In this tutorial we learn how to fix pipdeptree command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.