2

I am following the official docs, however, getting the error during import.

F:\>python
Python 2.7.11 |Anaconda custom (64-bit)| (default, Feb 16 2016, 09:58:36)[MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

>>> from dask.dot import dot_graph

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda\lib\site-packages\dask\dot.py", line 11, in <module>
    graphviz = import_required("graphviz", "Drawing dask graphs requires the "
  File "C:\Anaconda\lib\site-packages\dask\utils.py", line 70, in import_required
raise RuntimeError(error_msg)
RuntimeError: Drawing dask graphs requires the `graphviz` python library and the `graphviz` system library to be installed.
>>>

I am running Anaconda and have installed graphviz.

C:\>conda install graphviz
Using Anaconda API: https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........

# All requested packages already installed.
# packages in environment at C:\Anaconda:
#
graphviz                  2.38.0                        2

I've got a directory C:\Anaconda\Library\bin\graphviz with the bunch of .exe, .dll and other files inside. There is also something in PATH variable:

F:\>where dot
C:\Anaconda\Library\bin\dot.bat

Here is the content of that file (C:\Anaconda\Library\bin\dot.bat):

@echo off 
%~dp0.\graphviz\dot.exe %* 

I have dask 0.11.0 installed:

F:\>conda list dask
# packages in environment at C:\Anaconda:
#
Using Anaconda API: https://api.anaconda.org
dask                      0.11.0                   py27_0

These errors appear both in Windows and in Linux (Ubuntu 16.04 with all recent updates).

What else does it require?

wl2776
  • 4,099
  • 4
  • 35
  • 77
  • What about `where graphviz`? – Ohad Eytan Sep 02 '16 at 09:05
  • "Could not find files for the given pattern(s)". But this command is not supposed to find anything, AFAIK, since GraphViz is the name of the project. Main executable from this package is dot. – wl2776 Sep 02 '16 at 09:28

2 Answers2

2

I'm not using Anaconda, but generaly if you wish to use graphviz you should:

  1. Install the graphviz python module (probably with pip install graphviz).
  2. Download and install the graphviz software.
Ohad Eytan
  • 8,114
  • 1
  • 22
  • 31
1

To use the visualizing part of dask in anaconda, install both the graphviz and python-graphviz packages. Dask depends on a python interface to graphviz to do visualizations.

$ conda install graphviz python-graphviz
microe14
  • 2,711
  • 1
  • 15
  • 5
  • yes, as explained in https://github.com/ContinuumIO/anaconda-issues/issues/485#issuecomment-279296254 this step is necessary – K.S. Oct 18 '19 at 17:46