keras
keras copied to clipboard
Module 'pydot' has no attribute 'InvocationException'
The error occured using plot_model with the latest newly installed versions of pydot and graphviz. I tried to follow the instructions in issue 3210 to no avail. Specifically I tried
pip install pydot-ng pip install pydot==1.0.2 --upgrade (but not sudo pip install pydot==1.0.2 --upgrade because I do not have administrative priveledges on this system)
Hi @novalex9800 ,
The error indicates the installed version of pydot might be older and don't have attribute InvocationException
.
You might need pydot_ng ~=2.0.0 with keras3. I tested installing pydot_ng=1.0.0 & 2.0.0 , pydot=1.4.2 and called pydot.InvocationException()
which is success.Please refer attached gist.
You might need to ensure latest pydot_ng
and make sure it was imported. Please submit the version of pydot_ng imported. May be you can create a separate environment of your own.
I got the same error when trying to use the 'plot_model' function of Keras in TensorFlow. This function uses both pydot and graphviz, and I solved the problem by properly installing graphviz. I installed graphviz (on Windows OS) using the executable file that can be found here - https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224
I hope this helps!!
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.
The issue still persists!
Same here, the issue still persists for me!
possible solution: I installed pydot==2.0.0 and graphviz and the issue still persisted for me. However, after just simply restarting the pc, the issue was gone. Not sure if this simple solution helps, but you can try it :) good luck!
Please refer your tensorflow version when you ask about these packages issues, because most of the time it is just version compatibility. For me i just had to close the pycharm project and reopen it to get it work.
tensorflow 2.16.1. The problem still exists
I installed pydot version 1.4.2 and now there is another error
You must install graphviz (see instructions at https://graphviz.gitlab.io/download/) for `plot_model` to work.
While I have already installed both version 11 and version 2.5 of this tool and it still doesn't work
I installed version 2.46 of graphviz and rebooted the computer. Everything worked
I had the same issue, I have a conda environment with python3.11.9
, and what worked for me was
pip install pydot==2.0.0
sudo apt install graphviz
for Mac: brew install graphviz problem's gone
I'm using tensorflow 2.16.1
with a Conda environment on macOS. The following worked for me:
pip install pydot
conda install graphviz
I'm using 'Windows-10-10.0.22631-SP0'
with tensorflow 2.16.1
, keras 3.4.1
in Conda environment. I had the same issue, and was fixed with the following:
pip install pydot # 2.0.0
conda install graphviz # 2.50.0
I'm using tf 2.16.1 and keras 3.4.1 with ubuntu2204.I had the same issue, and fixed.
pip install pydot
sudo apt install graphviz
For Mac M2 Keras: 3.4.1 pydot: 1.4.2 brew install graphviz
I had the same issue, I have a conda environment with
python3.11.9
, and what worked for me waspip install pydot==2.0.0 sudo apt install graphviz
On Ubuntu 22.04.4 and sudo apt install graphviz
worked for me
tensorflow 2.16.1. The problem still exists
Hi, Did you solve the issue?? if yes, could you tell me how??