PyGraphViz Python libraries are used to plot causal inference networks.
If you try to install
PyGraphViz as a standard library, it fails due to dependency errors.
PyGraphViz has the following dependencies:
Install the dependencies with
sudo apt-get install -y python3-dev graphviz libgraphviz-dev pkg-config
After the dependencies are installed, use
pip install pygraphviz
Create the init script.
dbutils.fs.put("dbfs:/databricks/<init-script-folder>/install-pygraphviz.sh", """ #!/bin/bash #install dependent packages sudo apt-get install -y python3-dev graphviz libgraphviz-dev pkg-config pip install pygraphviz""", True)
Install the init script that you just created as a cluster-scoped init script.
You will need the full path to the location of the script (
Restart the cluster after you have installed the init script.