1. Error information
When building the neural network model, you can call plot in keras_ The model module draws a schematic diagram of the model to facilitate the adjustment of the model structure:
from tensorflow.keras.models import Model
from tensorflow.keras.utils import plot_model
model = Model(dense_inputs+sparse_inputs, output_layer)
plot_model(model, "fm_model.png", show_shapes=True)
As a result, the following error messages appear:
(‘Failed to import pydot. You must pip install pydot and install graphviz (ht
tps://graphviz.gitlab.io/download/ ), ‘, ‘for pydotprint to work.’)
Understand the error message: the installation is complete without pydot and graphviz packages
2. Solutions
2.1 installation of graphviz package
pip install graphviz
2.2 download and install graphviz Exe file and install
In Windows Environment
Download address: https://graphviz.gitlab.io/download/
2.3 configuring environment variables for graphviz
2.4 installing pydot package
pip install pydot-ng
2.5 restart development tools
Restart the IDE or other development tools (Jupiter notebook) with immediate effect.
3. Summary
1. Installing pydot and graphviz packages directly according to the error message does not work
2. You need to go to the website to download the corresponding EXE file or zip file. After installation, specify the environment variables
3. Don’t forget to restart your ide or other development tools
Read More:
- Keras’ print model error: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
- [Solved] Tensorflow error or keras error and tf.keras error: oom video memory is insufficient
- Keras-nightly Import package Error: cannot import name ‘Adam‘ from ‘keras.optimizers‘
- [Solved] Opencv Calls PB Model Error: cv2.error: OpenCV(4.2.0)…
- Error in plot.new() : figure margins too large
- Internalerror: GPU sync failed error (How to Solve)
- R language: How to Solve DMwR Install Error
- VScode: How to Solve golong plug-in install Error
- [Solved] Tensorflow/Keras Error reading weights: ValueError: axes don‘t match array
- How to Solve jupyter notebook service error
- How to Solve svn error: WC DB
- R Language: How to Solve featureplot function Error
- Onnx to tensorrt model error [How to Solve]
- How to Solve Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- How to Solve [error] malformed \uxxxx encoding Error
- How to Solve null/hadoopbinary/wintils.exe Error
- How to Solve ruby rails Install Error [Windows]
- How to Solve cocos2dx msb3073 Error
- How to Solve VScode 2022 error: msvcp110d.dll not found