Skip to content

Commit d2962dd

Browse files
authored
Modify graphviz installation command (#1178)
Modify graphviz installation command in README.rst, contributing-code.rst, and install.rst. Solves #1172 Signed-off-by: Harsh Sinha <harsh.sinha@pitt.edu>
1 parent 333c9a8 commit d2962dd

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

README.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,18 @@ Optionally, if you wish to input graphs in the dot format, then install pydot (o
122122
For better-looking graphs, you can optionally install pygraphviz. To proceed,
123123
first install graphviz and then pygraphviz (on Ubuntu and Ubuntu WSL).
124124

125+
.. note::
126+
Installing pygraphviz can cause problems on some platforms.
127+
One way that works for most Linux distributions is to
128+
first install graphviz and then pygraphviz as shown below.
129+
Otherwise, please consult the documentation of `pygraphviz <https://pygraphviz.github.io/documentation/stable/install.html>`_.
130+
125131
.. code:: shell
126132
127133
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
128-
## from https://github.com/pygraphviz/pygraphviz/issues/71
129-
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
130-
--install-option="--library-path=/usr/lib/graphviz/"
134+
pip install --global-option=build_ext \
135+
--global-option="-I/usr/local/include/graphviz/" \
136+
--global-option="-L/usr/local/lib/graphviz" pygraphviz
131137
132138
Example: Effect identification and estimation
133139
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/source/contributing/contributing-code.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ The following steps allow you to contribute code to DoWhy.
3636
.. code:: shell
3737
3838
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
39-
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
40-
--install-option="--library-path=/usr/lib/graphviz/"
39+
pip install --global-option=build_ext \
40+
--global-option="-I/usr/local/include/graphviz/" \
41+
--global-option="-L/usr/local/lib/graphviz" pygraphviz
4142
4243
#. (optional) add dowhy as an upstream remote to keep your
4344
fork up-to-date with DoWhy's main branch.

docs/source/getting_started/install.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,18 @@ Optionally, if you wish to input graphs in the dot format, then install pydot (o
3737
For better-looking graphs, you can optionally install pygraphviz. To proceed,
3838
first install graphviz and then pygraphviz (on Ubuntu and Ubuntu WSL).
3939

40+
.. note::
41+
Installing pygraphviz can cause problems on some platforms.
42+
One way that works for most Linux distributions is to
43+
first install graphviz and then pygraphviz as shown below.
44+
Otherwise, please consult the documentation of `pygraphviz <https://pygraphviz.github.io/documentation/stable/install.html>`_.
45+
4046
.. code:: shell
4147
4248
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
43-
## from https://github.com/pygraphviz/pygraphviz/issues/71
44-
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
45-
--install-option="--library-path=/usr/lib/graphviz/"
49+
pip install --global-option=build_ext \
50+
--global-option="-I/usr/local/include/graphviz/" \
51+
--global-option="-L/usr/local/lib/graphviz" pygraphviz
4652
4753
Installing with Conda
4854
---------------------

0 commit comments

Comments
 (0)