I'm trying to get some code to run and I'm triggering an error:
if not isInstalled('dot') and not isInstalled('dot.exe'):
print "You must have graphviz (specifically dot) installed to run code2flow"
sys.exit(1)
which calls
def isInstalled(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return True
return False
But I don't understand why this is failing. My path contains graphviz
> echo %PATH%
...;c:\\Program Files (x86)\\Graphviz2.38\\bin;...
and the file is present
> dir "c:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe"
Directory of c:\\Program Files (x86)\\Graphviz2.38\\bin
04/14/2014 09:22 AM 7,680 dot.exe
Any ideas of what is going wrong?
I have this error, too.
I try to run the command:
sudo python setup.py install
It's okay now.
My way to install code2flow is by using pip install.
But the codes inside ./ur/path/to/code2flow is written with python2.
Thus!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.