GraphViz failing while running Keras examples

bdeshpanbdeshpan Member Posts: 3 Contributor I
edited June 2019 in Help

Hi Forum

Trying to run Keras extension. I have installed all relevant libraries using native pip - python 3.5.2 (and also in anaconda, using conda install - python 3.6.6). I have tensorflow, keras, pydot and graphviz all installed. However when i execute a Keras example model, RM errors out with the attached error message. 

 

image.png

 

All PATH attributes appear ok. please see below.

image.png

any insights? Thanks.

Answers

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn

    Hi @bdeshpan,

     

    I encountered a similar problem with Keras extension.

    I had to update a component, but unfortunately I don' t rememeber its name (it seems this is "flasq" or "flask"...)

    The screenshots you shared are not visible in your post.

    Can you try again by using "Photos" : 

    how_to_post.png

     

    With the name and description of your error, i will try to recover this component.

     

    Regards,

     

    Lionel

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn

    Hi again @bdeshpan,

     

    I remember now : You have to update the component "dask".

    Open a Windows CMD and execute the following command : 

     

    pip install dask  --upgrade

    I hope it helps,

     

    Regards,

     

    Lionel

     

  • bdeshpanbdeshpan Member Posts: 3 Contributor I

    Hi @lionelderkrikor

    Thanks for your help. Unfortunately after installing dask like you suggested, it still gives the same error that i captured in the screenshot in my original post.

    **********************************************

     

    Jul 30, 2018 6:45:37 PM INFO: Traceback (most recent call last):

    Jul 30, 2018 6:45:37 PM INFO: File "script", line 300, in rm_main

    Jul 30, 2018 6:45:37 PM INFO: save_model_graph_to_file(model, 'C:/Users/B/a735a1e4-5914-4ab3-adbb-a421fd62e7e8.png')

    Jul 30, 2018 6:45:37 PM INFO: File "script", line 197, in save_model_graph_to_file

    Jul 30, 2018 6:45:37 PM INFO: show_layer_names=True)

    Jul 30, 2018 6:45:37 PM INFO: File "C:\Users\B\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\vis_utils.py", line 132, in plot_model

    Jul 30, 2018 6:45:37 PM INFO: dot = model_to_dot(model, show_shapes, show_layer_names, rankdir)

    Jul 30, 2018 6:45:37 PM INFO: File "C:\Users\B\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\vis_utils.py", line 55, in model_to_dot

    Jul 30, 2018 6:45:37 PM INFO: _check_pydot()

    Jul 30, 2018 6:45:37 PM INFO: File "C:\Users\B\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\utils\vis_utils.py", line 29, in _check_pydot

    Jul 30, 2018 6:45:37 PM INFO: '`pydot` failed to call GraphViz.'

    Jul 30, 2018 6:45:37 PM INFO:

    Jul 30, 2018 6:45:37 PM INFO: OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH. (script, line 197)

     

    *********************************

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn

    Hi @bdeshpan,

     

    Can you perform the test of Keras installation ?

    Go to Settings -> Preferences -> Keras and click on the "test" button : 

    Keras_test.png

     

    Regards,

     

    Lionel

     

  • hughesfleming68hughesfleming68 Member Posts: 323 Unicorn

    I went though this yesterday to install Keras into beta 9. Hitting test will show that everything is installed properly but the process will fail. I solved the problem by downloading Graphviz and setting the environment variable to the bin directory. Reinstall graphviz in python but use pip and not conda. Make sure pip is updated. Type echo %PATH% to be certain that your paths are in order. In Rapidminer, make sure you are pointing to the correct python environment if you have set one up.

     

    I have python 3.6.6 / Tensorflow 1.9- GPU / Keras 2.2.2 / Graphviz 3.8 and everything is working in beta 9 on Windows 10 but I did have to mess with it a bit. It was not the first time that I have installed this but the first time that I am using the GPU under windows.

     

    Let me know if you have any further questions or if you have already solved the problem.

     

    regards,

     

    Alex

     

    Conda list shows the following:

    conda list.JPG

Sign In or Register to comment.