Skip to content

Commit

Permalink
Modify graphviz installation command (#1178)
Browse files Browse the repository at this point in the history
Modify graphviz installation command in README.rst, contributing-code.rst, and install.rst. Solves #1172

Signed-off-by: Harsh Sinha <[email protected]>
  • Loading branch information
sinhaharsh authored May 15, 2024
1 parent 333c9a8 commit d2962dd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
12 changes: 9 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,18 @@ Optionally, if you wish to input graphs in the dot format, then install pydot (o
For better-looking graphs, you can optionally install pygraphviz. To proceed,
first install graphviz and then pygraphviz (on Ubuntu and Ubuntu WSL).

.. note::
Installing pygraphviz can cause problems on some platforms.
One way that works for most Linux distributions is to
first install graphviz and then pygraphviz as shown below.
Otherwise, please consult the documentation of `pygraphviz <https://pygraphviz.github.io/documentation/stable/install.html>`_.

.. code:: shell
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
## from https://github.com/pygraphviz/pygraphviz/issues/71
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
--install-option="--library-path=/usr/lib/graphviz/"
pip install --global-option=build_ext \
--global-option="-I/usr/local/include/graphviz/" \
--global-option="-L/usr/local/lib/graphviz" pygraphviz
Example: Effect identification and estimation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 3 additions & 2 deletions docs/source/contributing/contributing-code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ The following steps allow you to contribute code to DoWhy.
.. code:: shell
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
--install-option="--library-path=/usr/lib/graphviz/"
pip install --global-option=build_ext \
--global-option="-I/usr/local/include/graphviz/" \
--global-option="-L/usr/local/lib/graphviz" pygraphviz
#. (optional) add dowhy as an upstream remote to keep your
fork up-to-date with DoWhy's main branch.
Expand Down
12 changes: 9 additions & 3 deletions docs/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ Optionally, if you wish to input graphs in the dot format, then install pydot (o
For better-looking graphs, you can optionally install pygraphviz. To proceed,
first install graphviz and then pygraphviz (on Ubuntu and Ubuntu WSL).

.. note::
Installing pygraphviz can cause problems on some platforms.
One way that works for most Linux distributions is to
first install graphviz and then pygraphviz as shown below.
Otherwise, please consult the documentation of `pygraphviz <https://pygraphviz.github.io/documentation/stable/install.html>`_.

.. code:: shell
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
## from https://github.com/pygraphviz/pygraphviz/issues/71
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
--install-option="--library-path=/usr/lib/graphviz/"
pip install --global-option=build_ext \
--global-option="-I/usr/local/include/graphviz/" \
--global-option="-L/usr/local/lib/graphviz" pygraphviz
Installing with Conda
---------------------
Expand Down

0 comments on commit d2962dd

Please sign in to comment.