Skip to content

Commit

Permalink
Improve Mac install instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
spfrommer committed Dec 30, 2023
1 parent 02d14ef commit 89eb5e2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,26 @@ torchexplorer.watch(model, backend='wandb') # Or 'standalone'
### Install
Installing requires one external `graphviz` dependency, which should be available on most package managers.

_Linux_.
```bash
sudo apt-get install libgraphviz-dev graphviz
pip install torchexplorer
```
For Mac, `brew install graphviz` should suffice. If the `pygraphviz` wheel build fails because it can't find `Python.h`, you must install the python header files as described [here](https://stackoverflow.com/a/22077790/4864247).
If the `pygraphviz` wheel build fails because it can't find `Python.h`, you must install the python header files as described [here](https://stackoverflow.com/a/22077790/4864247).

_Mac_.
```bash
brew install graphviz
pip install torchexplorer
```
If there's an error regarding `#include "graphviz/cgraph.h"`, [the following](https://github.com/pygraphviz/pygraphviz/issues/11#issuecomment-1038479834) worked for me on Apple silicon:
```bash
python -m pip install \
--global-option=build_ext \
--global-option="-I$(brew --prefix graphviz)/include/" \
--global-option="-L$(brew --prefix graphviz)/lib/" \
pygraphviz
```

### Usage

Expand Down

0 comments on commit 89eb5e2

Please sign in to comment.