I gave a bounty to the other question, but then realized there's a better way:
conda install graphviz
installs the binaries for GraphViz,
(So you don't need to visit GraphViz website, and they'll presumably be kept updated in the usual conda way.)
conda install python-graphviz
installs the Python frontend for GraphViz. (This is the same as pip install graphviz
, which has led to great confusion.)
The conda version of the graphviz frontend has been patched to support the binaries installed by the conda graphviz
package, so for graphviz itself, this should be all you need.
For pydot
, however, in Windows, this will not work until you include these binaries in your PATH. You can do this temporarily within your script with:
import os
os.environ["PATH"] += os.pathsep + 'PATH_STRING'
before the command that calls pydot
.
The PATH_STRING is either C:\Anaconda3\envs\ENV_NAME\Library\bin\graphviz
for a specific conda environment, or C:\Anaconda3\Library\bin\graphviz
for the default environment.
(I had to install a py3.6 environment for Tensorflow, since it doesn't yet support py3.7 and conda install tensorflow
was hanging for hours, trying to figure out how to downgrade every package on my system. (Probably other people installing GraphViz are doing so for the same reason.))