Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why InvocationException: Program terminated with status: 1. stderr follows: Format: "ps" not recognized?

Using this code below;

plot_model(model, show_shapes=True, show_layer_names=True)

I get the following error message: InvocationException: Program terminated with status: 1. stderr follows: Format: "ps" not recognized.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

How can I resolve the error above?

Your kind response is welcome.

>Solution :

This problem is related to Graphviz on Windows.
First install the following libraries;
pip install pydot
pip install graphviz
pip install pydot_ng

Graphviz plugins need to be registered before they can be used. In Windows, open the command prompt as admin and type dot -c to register. You can verify it by typing dot –v

If you encounter the following error:

C:\Users\ugoch>dot -c
Error: failed to open C:\Program Files\Graphviz 2.44.1\bin\config6 for write.

C:\Users\ugoch>dot -v
dot – graphviz version 2.44.1 (20200629.0846)

There is no layout engine support for "dot"
Perhaps "dot -c" needs to be run (with installer’s privileges) to register the plugins?

The next thing to do is to uninstall Graphviz from control panel and follow the steps below:

Visit the appropriate download location for your computer:

32-bit: https://www2.graphviz.org/Packages/stable/windows/10/cmake/Release/Win32/65

64-bit: https://www2.graphviz.org/Packages/stable/windows/10/cmake/Release/x64/896

  1. Download and run the graphviz-install-VERSION.exe file.
  2. Ignore any security warnings you might get.
  3. During the installation, make sure you select “Add Graphviz top the system PATH for current user”.
  4. When the installation is finished, start CMD as an administrator
  5. Run dot -c in the Administrator: Console Prompt window.
  6. Restart any applications or Command prompts where you want to use Graphviz.
    Try restarting your computer if you still have problems starting Graphviz.
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading