networkxでグラフを作図したいと思い、pygraphvizを導入しようとしましたがエラーが発生しました。
初回に実行したときはMicrosoft Visual C++ 14.0が必要とエラーが出たので、導入後のエラーです。
解決策と、今後同じような状況(エラー発生時やパッケージの導入)に直面した時、どのように
よろしくお願いいたします。
環境:win10
#実行コマンド pip install pygraphviz
ERROR: Command errored out with exit status 1: command: 'c:\users\koya.takahashi\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-install-sxkbka0u\pygraphviz\setup.py'"'"'; __file__='"'"'C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-install-sxkbka0u\pygraphviz\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-record-mxdqriy_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\koya.takahashi\appdata\local\programs\python\python37\Include\pygraphviz' cwd: C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-install-sxkbka0u\pygraphviz\ Complete output (56 lines): running install include_dirs=None library_dirs=None running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\pygraphviz copying pygraphviz\agraph.py -> build\lib.win-amd64-3.7\pygraphviz copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.7\pygraphviz copying pygraphviz\release.py -> build\lib.win-amd64-3.7\pygraphviz copying pygraphviz\version.py -> build\lib.win-amd64-3.7\pygraphviz copying pygraphviz\__init__.py -> build\lib.win-amd64-3.7\pygraphviz creating build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_setup.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.7\pygraphviz\tests copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.7\pygraphviz\tests running egg_info writing pygraphviz.egg-info\PKG-INFO writing dependency_links to pygraphviz.egg-info\dependency_links.txt writing top-level names to pygraphviz.egg-info\top_level.txt reading manifest file 'pygraphviz.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.png' under directory 'doc' warning: no files found matching '*.html' under directory 'doc' warning: no files found matching '*.txt' under directory 'doc' warning: no files found matching '*.css' under directory 'doc' 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.win-amd64-3.7\pygraphviz copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.7\pygraphviz running build_ext building 'pygraphviz._graphviz' extension creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\pygraphviz C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\koya.takahashi\appdata\local\programs\python\python37\include -Ic:\users\koya.takahashi\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.7\Release\pygraphviz/graphviz_wrap.obj graphviz_wrap.c pygraphviz/graphviz_wrap.c(2987): fatal error C1083: include ファイルを開けません。'graphviz/cgraph.h':No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\koya.takahashi\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-install-sxkbka0u\pygraphviz\setup.py'"'"'; __file__='"'"'C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-install-sxkbka0u\pygraphviz\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\KOYA~1.TAK\AppData\Local\Temp\pip-record-mxdqriy_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\koya.takahashi\appdata\local\programs\python\python37\Include\pygraphviz' Check the logs for full command output.
回答1件
あなたの回答
tips
プレビュー