how to use pycallgraph in ubuntu and window?
meInvent bbird
jobmattcon at gmail.com
Thu Oct 13 23:29:39 EDT 2016
i install in ubunbu 14
pip install graphviz
pip install pycallgraph
martin at 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
More information about the Python-list
mailing list