I succeed in installing graphviz
and cgraph
with
$ sudo pip install graphviz
....
Successfully installed graphviz-0.5.1
$ sudo pip ins
For fedora users:
graphviz*
sudo yum install 'graphviz-devel.x86_64'
pip install pygraphviz
For MacOS, I needed to do:
$ brew install graphviz
$ sudo pip install pygraphviz
For CentOS. As graphviz-devel is required to fix this issue, you will need to install it with yum. To do this you are required to add repo's where package is available. In my case Atomic repos worked fine.
wget -q -O - http://www.atomicorp.com/installers/atomic | sh
This will add atomic repos, then
sudo yum install graphviz-devel
And you should be able to perform
pip install pygraphviz
On macOS, I made it with,
$ brew install graphviz
$ sudo pip install pygraphviz
I ran into this problem when creating a Dockerfile for Django with a python-alpine image.
I was able to solve it thanks to this post adding the package "graphviz-dev" along with the rest of my app's dependencies.
Example:
#Install dependencies
RUN apk add --update --no-cache --virtual .build-deps \
build-base \
alpine-sdk \
postgresql-dev \
libffi-dev \
python3-dev \
libffi-dev \
jpeg-dev \
zlib-dev \
musl-dev \
libpq \
graphviz-dev \
&& pip install --no-cache-dir -r /code/requirements_dev.txt \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' +
Regards
sudo apt-get install python-dev graphviz libgraphviz-dev pkg-config
or the following might be needed if you're using Python 3:
sudo apt-get install python3-dev graphviz libgraphviz-dev pkg-config
then
pip install pygraphviz