pygraphvizをうまくインストール出来ませんので対処法を教えていただきたいです。
1.graphvizはpkgを使ってインストールしました。
2.そのあとでpipでpygraphvizをインストールしようとしたら以下のようにエラーが出ました。
Collecting pygraphviz Using cached pygraphviz-1.3.1.zip Building wheels for collected packages: pygraphviz Running setup.py bdist_wheel for pygraphviz ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/pip-build-uuALX9/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/tmpeNTXyZpip-wheel- --python-tag cp27: running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.10-intel-2.7 creating build/lib.macosx-10.10-intel-2.7/pygraphviz copying pygraphviz/__init__.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz copying pygraphviz/agraph.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz copying pygraphviz/graphviz.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz copying pygraphviz/release.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz copying pygraphviz/version.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz creating build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/__init__.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_attributes.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_clear.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_graph.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_html.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_layout.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_string.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-10.10-intel-2.7/pygraphviz/tests running egg_info writing pygraphviz.egg-info/PKG-INFO writing top-level names to pygraphviz.egg-info/top_level.txt writing dependency_links to pygraphviz.egg-info/dependency_links.txt warning: manifest_maker: standard file '-c' not found reading manifest file 'pygraphviz.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '.svn' found anywhere in distribution no previously-included directories found matching 'doc/build' writing manifest file 'pygraphviz.egg-info/SOURCES.txt' copying pygraphviz/graphviz.i -> build/lib.macosx-10.10-intel-2.7/pygraphviz copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-10.10-intel-2.7/pygraphviz running build_ext building 'pygraphviz._graphviz' extension creating build/temp.macosx-10.10-intel-2.7 creating build/temp.macosx-10.10-intel-2.7/pygraphviz cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.10-intel-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 'cc' failed with exit status 1 ---------------------------------------- Failed building wheel for pygraphviz Running setup.py clean for pygraphviz Failed to build pygraphviz Installing collected packages: pygraphviz Running setup.py install for pygraphviz ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/pip-build-uuALX9/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/pip-FKX_ud-record/install-record.txt --single-version-externally-managed --compile: running install Trying pkg-config Failed to find pkg-config Trying dotneato-config Failed to find dotneato-config Failed to find dotneato-config Your Graphviz installation could not be found. 1) You don't have Graphviz installed: Install Graphviz (http://graphviz.org) 2) Your Graphviz package might incomplete. Install the binary development subpackage (e.g. libgraphviz-dev or similar.) 3) You are using Windows There are no PyGraphviz binary packages for Windows but you might be able to build it from this source. See http://networkx.lanl.gov/pygraphviz/reference/faq.html If you think your installation is correct you will need to manually change the include_dirs and library_dirs variables in setup.py to point to the correct locations of your graphviz installation. The current setting of library_dirs and include_dirs is: library_dirs=None include_dirs=None error: Error locating graphviz. ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/pip-build-uuALX9/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/pip-FKX_ud-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/c0/0kzgkqw92qq4wplfvdqx_czh0000gn/T/pip-build-uuALX9/pygraphviz/
3.次にこのサイトに書いてある手続きを行ってsetup.pyを用いたインストールを試みたところ以下のエラーが出ました。
4.環境は mac=10.10.5, python=2.7.10, graphviz=2.36.0 です。
*graphvizのインストール先は3のサイトと一致していました。
python setup.py install running install Trying pkg-config Failed to find pkg-config include_dirs=/usr/local/include/graphviz/ library_dirs=/usr/local/lib/graphviz/ running build running build_py running egg_info writing pygraphviz.egg-info/PKG-INFO writing top-level names to pygraphviz.egg-info/top_level.txt writing dependency_links to pygraphviz.egg-info/dependency_links.txt reading manifest file 'pygraphviz.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '.svn' found anywhere in distribution no previously-included directories found matching 'doc/build' writing manifest file 'pygraphviz.egg-info/SOURCES.txt' running build_ext building 'pygraphviz._graphviz' extension cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/local/include/graphviz/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.10-intel-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 'cc' failed with exit status 1
ご回答よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。