首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能通过Visual 2017安装pygraphviz 15.7.1

未能通过Visual 2017安装pygraphviz 15.7.1
EN

Stack Overflow用户
提问于 2018-07-01 09:14:20
回答 1查看 464关注 0票数 1

这是我得到的错误代码

代码语言:javascript
复制
----- 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\15\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 Studio\2017\Enterprise\VC\Tools\MSVC\14.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 Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.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 Studio\2017\Enterprise\VC\Tools\MSVC\14.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 Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.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安装这个名为pygraphviz for python环境Anaconda3的特定包。我甚至通过visual正确地更新了我的pip,并安装了graphvizcgraph

你知道为什么这个没被安装吗?我无法理解上面所有的代码。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-27 11:04:47

刚才也遇到了这个问题,在另一个问题中找到答案

这里总结如下:

从PyGraphviz文档-要使用PyGraphviz,您需要PythonVersion2.6.x或2.7.x。 PyGraphviz不适用于Python3。 链接为您提供更多信息。

在使用Anaconda3时,您使用的是Python3。

在对答案的评论中也有一个变通之处,但我还没有尝试过。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51121951

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档