问题
I'm using the tensorflow docker image run this way:
docker run -it --rm -v $(realpath ~/Documents/notebooks):/tf/notebooks -p 8888:8888 tensorflow/tensorflow:latest-py3-jupyter
I'm trying to generate dot files / plots of the model I've made, but all of the functions say:
Failed to import pydot. You must install pydot and graphviz for
pydotprint
to work.
At the top of my notebook, I have:
!pip install pydot
!pip install graphviz
And I'm using Tensorflow 2.0.0
How do I get this to work? Everything I've seen says to install those modules with pip. I've done that, but it doesn't seem to help.
回答1:
Use
conda install graphviz
conda install pydot
can solve the problem.
It seems like that graphviz
is a system level package which should be installed by conda
or apt/yum/brew
来源:https://stackoverflow.com/questions/58294970/jupyter-w-tensorflow-pydotprint-not-found-error