воскресенье, 29 апреля 2018 г.

Проблемы с pydot и graphviz


Most of the people gave great insights, here's a procedure which I find useful for myself -

assumed conf. -> Anaconda 4.4.0 or higher, Win 8+, and using anaconda prompt


  • Few required installations (no order necessary)
    1. pip install pydot-ng
    2. conda install graphviz
    3. pip install graphviz
  • PATH setting -> Under user environment variables add C:/Anaconda/Library/bin/graphviz in PATH (not Path)
  • Go to C:/Anaconda/Lib/site-packages/keras/utils/
    Now open vis_utils.py in an editor and change line 11 from import pydot to import pydot_ng as pydot
  • All set, now go to Jupyter notebook and type following commands -
    import graphviz
    import pydot_ng as pydot
    pydot.find_graphviz()
    If everything went well then you will find something similar to as shown below -
    {'circo': 'C:\\Anaconda\\Library\\bin\\graphviz\\circo.exe',
    'dot': 'C:\\Anaconda\\Library\\bin\\graphviz\\dot.exe',
    'fdp': 'C:\\Anaconda\\Library\\bin\\graphviz\\fdp.exe',
    'neato': 'C:\\Anaconda\\Library\\bin\\graphviz\\neato.exe',
    'sfdp': 'C:\\Anaconda\\Library\\bin\\graphviz\\sfdp.exe',
    'twopi': 'C:\\Anaconda\\Library\\bin\\graphviz\\twopi.exe'}

Комментариев нет:

Отправить комментарий