我正在尝试通过Anaconda Navigator安装pydot_ng和graphviz,但我一直收到pydot_ng(1.0.0.15)的错误:
UnsatisfiableError: The following specifications were found to be in conflict:
- pydot-ng -> python 2.7*
- python 3.6*
Use "conda info <package>" to see the dependencies for each package.
我该怎么办? 没有pydot,我无法使用Keras可视化工具。 我已经安装了pydot plus但是Keras似乎在iPython笔记本中拒绝了这个错误。
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\vis_utils.py", line 131, in plot_model
dot = model_to_dot(model, show_shapes, show_layer_names, rankdir)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\vis_utils.py", line 52, in model_to_dot
_check_pydot()
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\vis_utils.py", line 27, in _check_pydot
raise ImportError('Failed to import pydot. You must install pydot'
ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
答案 0 :(得分:3)
为Python 3.5 +环境安装pydotplus(而不是pydot)。
sudo conda install pydotplus
sudo conda install graphviz
确保在代码中导入'pydotplus'(而不是pydot)。
答案 1 :(得分:0)
您正在尝试在Python 3.5环境中安装Python 2.7软件包。
也许这会有所帮助: How can I use conda to install pydot?