无法通过 Visual Studio 2017 15.7.1 安装 pygraphviz
Failed to Install pygraphviz through Visual Studio 2017 15.7.1
这是我收到的错误代码
----- Installing 'graphviz' -----
Collecting graphviz
Downloading https://files.pythonhosted.org/packages/84/44/21a7fdd50841aaaef224b943f7d10df87e476e181bb926ccf859bcb53d48/graphviz-0.8.3-py2.py3-none-any.whl
Installing collected packages: graphviz
Successfully installed graphviz-0.8.3
----- Successfully installed 'graphviz' -----
----- Installing 'cGraph' -----
Collecting cGraph
Downloading https://files.pythonhosted.org/packages/b8/fe/eaa8fa09ba2dd3f0d69305f84d8a21293be5ad49f6c308dac6e18ba45d80/cGraph-0.1.tar.gz
Building wheels for collected packages: cGraph
Running setup.py bdist_wheel for cGraph: started
Running setup.py bdist_wheel for cGraph: finished with status 'done'
Stored in directory: C:\Users\Rintu\AppData\Local\pip\Cache\wheels\b2\b8\a9fe542438b4a1b19148de99b1cca1974dfa4424c22817fb54
Successfully built cGraph
Installing collected packages: cGraph
Successfully installed cGraph-0.1
----- Successfully installed 'cGraph' -----
----- Installing 'pygraphviz==1.3.1' -----
Collecting pygraphviz==1.3.1
Using cached https://files.pythonhosted.org/packages/98/bb/a32e33f7665b921c926209305dde66fe41003a4ad934b10efb7c1211a419/pygraphviz-1.3.1.tar.gz
Building wheels for collected packages: pygraphviz
Running setup.py bdist_wheel for pygraphviz: started
Running setup.py bdist_wheel for pygraphviz: finished with status 'error'
Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\pygraphviz\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Rintu\AppData\Local\Temp\pip-wheel-9tqquc4s --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\agraph.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\release.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\version.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\__init__.py -> build\lib.win-amd64-3.6\pygraphviz
creating build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.6\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 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.6\pygraphviz
copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.6\pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\pygraphviz
C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\pygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(2954): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for pygraphviz
Failed building wheel for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz: started
Running setup.py install for pygraphviz: finished with status 'error'
Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\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\Rintu\AppData\Local\Temp\pip-record-953gmdyi\install-record.txt --single-version-externally-managed --compile:
running install
include_dirs=None
library_dirs=None
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\agraph.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\release.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\version.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\__init__.py -> build\lib.win-amd64-3.6\pygraphviz
creating build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.6\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 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.6\pygraphviz
copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.6\pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\pygraphviz
C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -INone "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\pygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(2954): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
Command ""C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\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\Rintu\AppData\Local\Temp\pip-record-953gmdyi\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\pygraphviz\
----- Failed to install 'pygraphviz==1.3.1' -----
我没有弄错我要去的地方。我正在尝试通过 visual studio 为 python 环境 Anaconda3 安装这个名为 pygraphviz
的特定包。我什至通过 visual studio 正确更新了我的 pip
并安装了 graphviz
和 cgraph
。
知道为什么没有安装吗?
我无法理解上面所有的代码。
也运行刚才遇到这个问题,
总结一下:
From PyGraphviz documentation -
To use PyGraphviz you need Python version 2.6.x or 2.7.x.
PyGraphviz does not work with Python 3
link to more info.
当您使用 Anaconda3 时,您正在使用 Python 3.
在答案的评论中也有一个解决方法,但我还没有尝试过。
这是我收到的错误代码
----- Installing 'graphviz' -----
Collecting graphviz
Downloading https://files.pythonhosted.org/packages/84/44/21a7fdd50841aaaef224b943f7d10df87e476e181bb926ccf859bcb53d48/graphviz-0.8.3-py2.py3-none-any.whl
Installing collected packages: graphviz
Successfully installed graphviz-0.8.3
----- Successfully installed 'graphviz' -----
----- Installing 'cGraph' -----
Collecting cGraph
Downloading https://files.pythonhosted.org/packages/b8/fe/eaa8fa09ba2dd3f0d69305f84d8a21293be5ad49f6c308dac6e18ba45d80/cGraph-0.1.tar.gz
Building wheels for collected packages: cGraph
Running setup.py bdist_wheel for cGraph: started
Running setup.py bdist_wheel for cGraph: finished with status 'done'
Stored in directory: C:\Users\Rintu\AppData\Local\pip\Cache\wheels\b2\b8\a9fe542438b4a1b19148de99b1cca1974dfa4424c22817fb54
Successfully built cGraph
Installing collected packages: cGraph
Successfully installed cGraph-0.1
----- Successfully installed 'cGraph' -----
----- Installing 'pygraphviz==1.3.1' -----
Collecting pygraphviz==1.3.1
Using cached https://files.pythonhosted.org/packages/98/bb/a32e33f7665b921c926209305dde66fe41003a4ad934b10efb7c1211a419/pygraphviz-1.3.1.tar.gz
Building wheels for collected packages: pygraphviz
Running setup.py bdist_wheel for pygraphviz: started
Running setup.py bdist_wheel for pygraphviz: finished with status 'error'
Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\pygraphviz\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Rintu\AppData\Local\Temp\pip-wheel-9tqquc4s --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\agraph.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\release.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\version.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\__init__.py -> build\lib.win-amd64-3.6\pygraphviz
creating build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.6\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 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.6\pygraphviz
copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.6\pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\pygraphviz
C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\pygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(2954): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for pygraphviz
Failed building wheel for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz: started
Running setup.py install for pygraphviz: finished with status 'error'
Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\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\Rintu\AppData\Local\Temp\pip-record-953gmdyi\install-record.txt --single-version-externally-managed --compile:
running install
include_dirs=None
library_dirs=None
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\agraph.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\release.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\version.py -> build\lib.win-amd64-3.6\pygraphviz
copying pygraphviz\__init__.py -> build\lib.win-amd64-3.6\pygraphviz
creating build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.6\pygraphviz\tests
copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.6\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 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.6\pygraphviz
copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.6\pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\pygraphviz
C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -INone "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\VC\Tools\MSVC.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\include.0.17134.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\pygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(2954): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
Command ""C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\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\Rintu\AppData\Local\Temp\pip-record-953gmdyi\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\pygraphviz\
----- Failed to install 'pygraphviz==1.3.1' -----
我没有弄错我要去的地方。我正在尝试通过 visual studio 为 python 环境 Anaconda3 安装这个名为 pygraphviz
的特定包。我什至通过 visual studio 正确更新了我的 pip
并安装了 graphviz
和 cgraph
。
知道为什么没有安装吗? 我无法理解上面所有的代码。
也运行刚才遇到这个问题,
总结一下:
From PyGraphviz documentation - To use PyGraphviz you need Python version 2.6.x or 2.7.x.
PyGraphviz does not work with Python 3
link to more info.
当您使用 Anaconda3 时,您正在使用 Python 3.
在答案的评论中也有一个解决方法,但我还没有尝试过。