pyprof2calltree command not found

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

Introduction

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

pyprof2calltree: command not found

or when using sudo you get the following error message

sudo: pyprof2calltree: command not found

Solutions to pyprof2calltree: command not found

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

In Ubuntu pyprof2calltree is provided by pyprof2calltree package.

pyprof2calltree is:

Pyprof2calltree converts cProfile data into a format that is consumable by kcachegrind and qcachegrind for graphical calltree analysis. This combination provides similar capabilities to Snakeviz or RunSnakeRun.

Pyprof2calltree is an adaptation of lsprofcalltree.py, written by David Allouche, Jp Calderone, Itamar Shtull-Trauring, and Johan Dahlin. It has been adapted to behave more like scripts in the kcachegrind-converters package. One of the authors’ objectives is for pyprof2calltree to eventually become part of the official upstream kdesdk package.

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

sudo apt-get -y install pyprof2calltree

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

You can also use apt command to install pyprof2calltree.

sudo apt -y install pyprof2calltree

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

sudo aptitude install pyprof2calltree

Summary

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