개발/Python

ImportError: ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')

강서버 2021. 6. 15. 20:16
728x90
반응형

>>> keras.utils.plot_model(model)


Traceback (most recent call last):
File "/home/user/dev/git/py_test/python/hongong/ch08/test_08_2.py", line 29, in
keras.utils.plot_model(model)
File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/keras/utils/vis_utils.py", line 322, in plot_model
dot = model_to_dot(
File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/keras/utils/vis_utils.py", line 114, in model_to_dot
raise ImportError(message)
ImportError: ('You must install pydot (pip install pydot) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')

 

1. Python package install

$ pip install pydot

$ pip install graphviz

 

(optional)

$ pip install pydotplus

 

2. Ubuntu package install

$ sudo apt install graphviz

 

 

참조 : https://stackoverflow.com/questions/47605558/importerror-failed-to-import-pydot-you-must-install-pydot-and-graphviz-for-py

 

ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work

I have seen similar issue but it is not solved either, so I decided to ask. I am trying to visualize my model in keras using from keras.utils import plot_model plot_model(model, to_file='model.pn...

stackoverflow.com

https://stackoverflow.com/questions/47188756/keras-plot-model-tells-me-to-install-pydot/47209738#47209738

 

keras plot_model tells me to install pydot

I'm using python 3.6.3 on a windows 10 machine. I installed pydot and graphviz using pip install via: py -m pip install pydot py -m pip install graphviz I also went to the graphviz websit...

stackoverflow.com

 

728x90
반응형

'개발 > Python' 카테고리의 다른 글

PyCharm PEP8 setting  (0) 2021.06.18
PyTorch CPU version install (Windows / Linux) (PIP / Anaconda)  (0) 2021.06.18
Python runtime measurement  (0) 2021.06.11
Anaconda3 Update  (0) 2021.06.09
파이썬 가상 환경 만들기  (0) 2021.06.01