Skip to content

Commit

Permalink
Merge pull request #307 from iriusrisk/feature/OPT-990
Browse files Browse the repository at this point in the history
[feature/OPT-990] to dev
  • Loading branch information
smaneroiriusrisk authored Sep 19, 2023
2 parents f00cdbf + 9a18a58 commit 04eea85
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,25 @@ echo "C:\Program Files\Graphviz\bin" >> $PATH
```

Installing the `pygraphviz` lib setting the OS files location:

```shell
pip install --global-option=build_ext --global-option="-IC:\Program files\Graphviz\include" --global-option="-LC:\Program files\Graphviz\lib" pygraphviz
```

When on MacOS the pygraphviz compilation steps may fail because it can't find the graphviz headers.

First, make sure you have graphviz installed, for homebrew run:
```shell
brew install graphviz
```

Export the compilation flags to tell pip's build process where to find the headers:
```shell
export CFLAGS="-I $(brew --prefix graphviz)/include"
export LDFLAGS="-L $(brew --prefix graphviz)/lib"
```

You can now either try installing startleft (which will pull pygraphviz as a dependency) or install pygraphviz with `pip install pygraphviz`, in the same terminal.

---

### `pygraphviz/graphviz_wrap.c:154:11: fatal error: Python.h: No such file or directory`
Expand Down

0 comments on commit 04eea85

Please sign in to comment.