hdknr / note

Markdown Texts
http://qiita.com/hidelafoglia
7 stars 1 forks source link

pygraphviz/graphviz_wrap.c:2954:10: fatal error: 'graphviz/cgraph.h' file not found #12

Closed hdknr closed 8 years ago

hdknr commented 8 years ago
    building 'pygraphviz._graphviz' extension
    creating build/temp.macosx-10.10-x86_64-2.7
    creating build/temp.macosx-10.10-x86_64-2.7/pygraphviz
    clang -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/graphviz/2.38.0/include/graphviz -I/Users/hide/.anyenv/envs/pyenv/versions/2.7.10/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.10-x86_64-2.7/pygraphviz/graphviz_wrap.o
    pygraphviz/graphviz_wrap.c:2954:10: fatal error: 'graphviz/cgraph.h' file not found
    #include "graphviz/cgraph.h"
             ^
    1 error generated.
    error: command 'clang' failed with exit status 1
hdknr commented 8 years ago
$ brew update
Error: /usr/local must be writable!
$ sudo chown -R $(whoami):admin /usr/local
$ brew update
$ brew upgrade
$ brew doctor
hdknr commented 8 years ago

パスの問題です

$ pip install --install-option="--include-path=/usr/local/include" --install-option="--library-path=/usr/local/lib" pygraphviz
/Users/hide/.anyenv/envs/pyenv/versions/django/lib/python2.7/site-packages/pip/commands/install.py:180: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting pygraphviz
  Using cached pygraphviz-1.3.1.zip
Skipping bdist_wheel for pygraphviz, due to binaries being disabled for it.
Installing collected packages: pygraphviz
  Running setup.py install for pygraphviz ... done
Successfully installed pygraphviz-1.3.1