En un jupyter notebook en un entorno virtual
from keras.utils.vis_utils import plot_model
plot_model(model, to_file='model.png')
Pero me dice
ImportError: Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`.
Sin embargo cuando hicé con el entorno virtual :
>>> pip list :
...
pydot 1.2.4
Intenté con pip
y pip3
:
(mybotenv) mike@mike-Inspiron-3543:~/Documents/programming/mybot$ pip3 install pydot
Requirement already satisfied: pydot in ./mybotenv/lib/python3.5/site-packages (1.2.4)
Requirement already satisfied: pyparsing>=2.1.4 in ./mybotenv/lib/python3.5/site-packages (from pydot) (2.2.0)
Y mi version de Python es:
(mybotenv) mike@mike-Inspiron-3543:~/Documents/programming/mybot$ python -V
Python 3.5.2
Actualizacion
Apagué y reinicialicé el jupyter kernel y ahora obtengo:
`pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.
pip freeze
me dapydot==1.2.4
antes y después elpip uninstall pydot && pip3 install pydot
pip uninstall pydot
, y luego ejecutaspyp3 install pydot