crossroadsfpga / pigasus

100Gbps Intrusion Detection and Prevention System
663 stars 73 forks source link

graphviz #9

Open kobuworks opened 2 years ago

kobuworks commented 2 years ago

Hi, graphviz is available, however following error occurs, does anyone have BKM?

$ sudo python3 pigasus.py 
Traceback (most recent call last):
  File "pigasus.py", line 19, in <module>
    from fluid.visualizer import *
  File "/home/kobu/kobuworks/pigasus/fluid/visualizer.py", line 1, in <module>
    from graphviz import Graph, Digraph
ModuleNotFoundError: No module named 'graphviz'

thanks, BR/Kobu

hsadok commented 2 years ago

Have you tried running the following?

sudo python3 -m pip install graphviz
sidsahay commented 2 years ago

Oh, I see the potential problem, if you have a modern version of PyGraphviz (around 1.3+)?. Turns out we were using an older version of PyGraphviz. In newer versions, PyGraphviz expects from pygraphviz import AGraph and has a slightly different API. I will update this, meanwhile you can comment out from fluid.visualizer import * on line 19 of pigasus.py and pass_manager.add_pass(generate_visualizer_pass(VisualizerType.DEFAULT)) on line 685 of pigasus.py to disable the visualizer. It will still generate designs.