pycallgraph icon indicating copy to clipboard operation
pycallgraph copied to clipboard

pycallgraph.exceptions.PyCallGraphException

Open Integralist opened this issue 8 years ago • 6 comments

Hello,

I'm seeing this error with Python 3.6.1...

Traceback (most recent call last):
  File "/Users/markmcdonnell/.pyenv/versions/3.6.1/bin/pycallgraph", line 25, in <module>
    with __pycallgraph.PyCallGraph(config=__config):
  File "/Users/markmcdonnell/.pyenv/versions/3.6.1/Python.framework/Versions/3.6/lib/python3.6/site-packages/pycallgraph/pycallgraph.py", line 32, in __init__
    self.reset()
  File "/Users/markmcdonnell/.pyenv/versions/3.6.1/Python.framework/Versions/3.6/lib/python3.6/site-packages/pycallgraph/pycallgraph.py", line 53, in reset
    self.prepare_output(output)
  File "/Users/markmcdonnell/.pyenv/versions/3.6.1/Python.framework/Versions/3.6/lib/python3.6/site-packages/pycallgraph/pycallgraph.py", line 97, in prepare_output
    output.sanity_check()
  File "/Users/markmcdonnell/.pyenv/versions/3.6.1/Python.framework/Versions/3.6/lib/python3.6/site-packages/pycallgraph/output/graphviz.py", line 63, in sanity_check
    self.ensure_binary(self.tool)
  File "/Users/markmcdonnell/.pyenv/versions/3.6.1/Python.framework/Versions/3.6/lib/python3.6/site-packages/pycallgraph/output/output.py", line 96, in ensure_binary
    'The command "{}" is required to be in your path.'.format(cmd))
pycallgraph.exceptions.PyCallGraphException: The command "dot" is required to be in your path.

Integralist avatar Oct 05 '17 17:10 Integralist

@Integralist, I faced same issue, just install graphviz to your system, depending on OS you have to add dot.exe directory to PATH variable. After reloading command terminals opened everything worked fine.

reflash avatar Oct 17 '17 07:10 reflash

Awesome. Thanks @reflash

Integralist avatar Oct 17 '17 07:10 Integralist

@reflash, So I clearly need some help with this. I am getting the same exception but I am not clear as to were to add the dot command or directory. Thank you.

spatran137 avatar Nov 03 '17 17:11 spatran137

@spatran137, Can you give some details? Not sure what problem you have. If you installed graphviz - then just find the directory path, where the dot.exe exists and add it to system PATH variable.

reflash avatar Nov 03 '17 18:11 reflash

@reflash, So that was my issue I did not put the directory path in the system PATH variable. I was not thinking right I put it in the User variables. Once I put it in the system it worked. Thank you for your help.

spatran137 avatar Nov 03 '17 20:11 spatran137

debian: sudo apt-get install graphviz macos: brew install graphviz

ctrngk avatar May 28 '18 12:05 ctrngk