提交 8d4e0fd0 authored 作者: Mikhail Korobov's avatar Mikhail Korobov

DOC recommend pydot-ng

上级 5494d94a
...@@ -464,7 +464,7 @@ The graph after optimization: ...@@ -464,7 +464,7 @@ The graph after optimization:
Picture Printing of Graphs Picture Printing of Graphs
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
``pydotprint`` requires graphviz and pydot. ``pydotprint`` requires graphviz and either pydot or pydot-ng.
The graph before optimization: The graph before optimization:
......
...@@ -202,7 +202,7 @@ The graph after optimization: ...@@ -202,7 +202,7 @@ The graph after optimization:
Picture Printing of Graphs Picture Printing of Graphs
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
``pydotprint`` requires graphviz and pydot. ``pydotprint`` requires graphviz and either pydot or pydot-ng.
The graph before optimization: The graph before optimization:
......
...@@ -59,7 +59,8 @@ The following libraries and software are optional: ...@@ -59,7 +59,8 @@ The following libraries and software are optional:
`Git <http://git-scm.com>`_ `Git <http://git-scm.com>`_
To download bleeding-edge versions of Theano. To download bleeding-edge versions of Theano.
`pydot-ng <https://github.com/pydot/pydot-ng>`_ or `pydot <https://code.google.com/p/pydot/>`_ `graphiz <http://www.graphviz.org/>`__ and either
``pydot-ng <https://github.com/pydot/pydot-ng>`_ or `pydot <https://code.google.com/p/pydot/>`_
To be able to make picture of Theano computation graph. To be able to make picture of Theano computation graph.
pydot-ng is a pydot compatible replacement that support newer Python. pydot-ng is a pydot compatible replacement that support newer Python.
......
...@@ -17,12 +17,8 @@ Requirements ...@@ -17,12 +17,8 @@ Requirements
------------ ------------
``d3viz`` requires the `pydot <https://pypi.python.org/pypi/pydot>`__ ``d3viz`` requires the `pydot <https://pypi.python.org/pypi/pydot>`__
package. If you're using Python 2.x install pydot with pip:: package. `pydot-ng <https://github.com/pydot/pydot-ng>`__ fork is better
maintained, and it works both in Python 2.x and 3.x. Install it with pip::
pip install pydot
In Python 3.x install `pydot-ng <https://pypi.python.org/pypi/pydot-ng>`__
fork instead::
pip install pydot-ng pip install pydot-ng
......
...@@ -52,8 +52,9 @@ class PyDotFormatter(object): ...@@ -52,8 +52,9 @@ class PyDotFormatter(object):
def __init__(self, compact=True): def __init__(self, compact=True):
"""Construct PyDotFormatter object.""" """Construct PyDotFormatter object."""
if not pydot_imported: if not pydot_imported:
raise ImportError('Failed to import pydot. You must install pydot' raise ImportError('Failed to import pydot. You must install '
' and graphviz for `PyDotFormatter` to work.') 'graphviz and either pydot or pydot-ng for '
'`PyDotFormatter` to work.')
self.compact = compact self.compact = compact
self.node_colors = {'input': 'limegreen', self.node_colors = {'input': 'limegreen',
......
...@@ -747,8 +747,9 @@ def pydotprint(fct, outfile=None, ...@@ -747,8 +747,9 @@ def pydotprint(fct, outfile=None,
outputs = fct.outputs outputs = fct.outputs
topo = fct.toposort() topo = fct.toposort()
if not pydot_imported: if not pydot_imported:
raise RuntimeError("Failed to import pydot. You must install pydot" raise RuntimeError("Failed to import pydot. You must install graphviz"
" and graphviz for `pydotprint` to work.", " and either pydot or pydot-ng for "
"`pydotprint` to work.",
pydot_imported_msg) pydot_imported_msg)
g = pd.Dot() g = pd.Dot()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论