Jupyter w/ Tensorflow pydotprint not found error

ⅰ亾dé卋堺 提交于 2021-01-29 07:52:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!