I am currently trying to run gprof2dot on the gmon.out created by using the -pg option while compiling.

Now I have already done pip install gprof2dot. How am I supposed to run this on the gmon.out file that was created? Using the instructions given on the Github page(gprof main | gprof2dot.py | dot -Tpng -o output.png), I get the error:

bash: gprof2dot.py: command not found

Note: My executable is called main.

2 Answers 2


pip install gprof2dot installs the script as gprof2dot, not gprof2dot.py.

Just remove the .py in your command and you should be good to go.

For future reference: You can enter a part of an unknown command at your shell prompt and press Tab to try and auto-complete it (which I did in this case).

For packages installed via pip, you can also list the files they contain:

$ pip show -f gprof2dot
Name: gprof2dot
Version: 2015.12.01
Location: /tmp/tenv/lib/python2.7/site-packages

Anything that's executable should be in a bin directory somewhere.


I performed pip install gprof2dot and was pulling my hair out trying to figure out why it wasn't working. I'm placing this here for posterity since it's the first link I found when trying to search for my solution. While the above statement by n.st is absolutely correct.

I tried searching the bin folder and gprof2dot was not found still.

I discovered I had to perform a sudo pip install gprof2dot (so I had to uninstall my original installation using pip uninstall gprof2dot, then re-install using sudo pip install gprof2dot).

Once I did the above I was able to use the gprof2dot that n.st was recommending.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .