3

After I installed the package Iris with conda install -c scitools iris,

Whether using Ipython console or Jupyter notebook, the iris was always failed to import. The error subroutine shows like:

 ---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-1-005053b25f37> in <module>()
----> 1 import iris

/Users/TEST/anaconda/lib/python2.7/site-packages/iris/__init__.pyc in <module>()
    110 import iris.cube
    111 import iris._constraints
--> 112 import iris.fileformats
    113 import iris.io
    114 

/Users/TEST/anaconda/lib/python2.7/site-packages/iris/fileformats/__init__.py in <module>()
     23 from six.moves import (filter, input, map, range, zip)  # noqa
     24 
---> 25 from iris.io.format_picker import (FileExtension, FormatAgent,
     26                                    FormatSpecification, MagicNumber,
     27                                    UriProtocol, LeadingLine)

/Users/TEST/anaconda/lib/python2.7/site-packages/iris/io/__init__.py in <module>()
     31 
     32 import iris.fileformats
---> 33 import iris.fileformats.dot
     34 import iris.cube
     35 import iris.exceptions

/Users/TEST/anaconda/lib/python2.7/site-packages/iris/fileformats/dot.py in <module>()
     41             # Check PATH
     42             subprocess.check_output([_DOT_EXECUTABLE_PATH, '-V'],
---> 43                                     stderr=subprocess.STDOUT)
     44         except OSError:
     45             _DOT_EXECUTABLE_PATH = None

/Users/TEST/anaconda/lib/python2.7/subprocess.pyc in check_output(*popenargs, **kwargs)
    571         if cmd is None:
    572             cmd = popenargs[0]
--> 573         raise CalledProcessError(retcode, cmd, output=output)
    574     return output
    575 

CalledProcessError: Command '['dot', '-V']' returned non-zero exit status -5
Han Zhengzu
  • 3,694
  • 7
  • 44
  • 94
  • 1
    I'm getting the same error - almost: CalledProcessError: Command '['dot', '-Tsvg']' returned non-zero exit status 1 when using scikit tree classifier in Jupyter. pip and conda installed Graphviz. !dot -V returns dot - graphviz version 2.38.0 (20140413.2041) – Harvey May 03 '17 at 19:29

2 Answers2

2

I raised a similar issue on the iris GitHub tracker (https://github.com/SciTools/iris/issues/1899). Essentially, as much as I believe it was intended to be optional, the way it has been implemented I think Iris actually requires a dot installation. With conda, that should look like:

conda install graphviz

HTH

pelson
  • 21,252
  • 4
  • 92
  • 99
0

In my particular case, this error was resolved by installing GraphViz.

I believe the root case of this issue is that the graphiz python bindings cannot find the command line utilities required to render the output into some form, e.g. .pdf, .svg or .png.

Contango
  • 76,540
  • 58
  • 260
  • 305