Discussion:
how to use pycallgraph in ubuntu and window?
(too old to reply)
meInvent bbird
2016-10-14 03:29:39 UTC
Permalink
i install in ubunbu 14

pip install graphviz
pip install pycallgraph

***@ubuntu:~/Downloads$ pycallgraph graphviz -- ./pusher.py
Traceback (most recent call last):
File "/usr/local/bin/pycallgraph", line 25, in <module>
with __pycallgraph.PyCallGraph(config=__config):
File "/usr/local/lib/python2.7/dist-packages/pycallgraph/pycallgraph.py", line 32, in __init__
self.reset()
File "/usr/local/lib/python2.7/dist-packages/pycallgraph/pycallgraph.py", line 53, in reset
self.prepare_output(output)
File "/usr/local/lib/python2.7/dist-packages/pycallgraph/pycallgraph.py", line 97, in prepare_output
output.sanity_check()
File "/usr/local/lib/python2.7/dist-packages/pycallgraph/output/graphviz.py", line 63, in sanity_check
self.ensure_binary(self.tool)
File "/usr/local/lib/python2.7/dist-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.


in window

i had already added path

C:\Python27\Lib\site-packages\graphviz;C:\Python27\Lib\site-packages\pycallgraph

to environment variable path

but in cmd

'pycallgraph' is not recognized as an internal or external command,
operable program or batch file.

then i use full path
python "C:\Python27\Lib\site-packages\pycallgraph\py
callgraph.py" -- "C:\Users\hello\Downloads\pusher.py"
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pycallgraph\pycallgraph.py", line 3, in <m
odule>
from .output import Output
ValueError: Attempted relative import in non-package
dieter
2016-10-14 06:57:50 UTC
Permalink
Post by meInvent bbird
i install in ubunbu 14
pip install graphviz
pip install pycallgraph
...
pycallgraph.exceptions.PyCallGraphException: The command "dot" is required to be in your path.
This tells you that a required (operating system level) utility
(named "dot") is not available.

Carefully read the installation instructions, especially any
remark about dependencies. This should tell you where "dot" is supposed
to come from. Install all operating system level dependencies.

If "dot" should have come from "graphviz", then maybe a
"hash" is necessary to let your shell see new commands.
meInvent bbird
2016-10-14 07:34:55 UTC
Permalink
succeed to draw graph, thanks

originally i think pip install graphviz is enough

then search again

there is an win32 executable file graphviz need to be install
Post by dieter
Post by meInvent bbird
i install in ubunbu 14
pip install graphviz
pip install pycallgraph
...
pycallgraph.exceptions.PyCallGraphException: The command "dot" is required to be in your path.
This tells you that a required (operating system level) utility
(named "dot") is not available.
Carefully read the installation instructions, especially any
remark about dependencies. This should tell you where "dot" is supposed
to come from. Install all operating system level dependencies.
If "dot" should have come from "graphviz", then maybe a
"hash" is necessary to let your shell see new commands.
Loading...