首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为pygraphviz生成轮子失败

为pygraphviz生成轮子失败
EN

Stack Overflow用户
提问于 2017-07-31 23:45:06
回答 1查看 1.4K关注 0票数 0

我一直在使用pip为Windows安装pygraphviz时遇到问题。Python2.7运行良好,我已经使用pip完成了其他安装,没有出现错误。我已经安装了graphviz。

执行pip install pygraphviz时,我得到以下输出:

代码语言:javascript
复制
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 c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\cnh004\\appdata\\local\\temp\\pip-build-onw9wy\\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\cnh004\appdata\local\temp\tmpcdsmtypip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-2.7
  creating build\lib.win32-2.7\pygraphviz
  copying pygraphviz\agraph.py -> build\lib.win32-2.7\pygraphviz
  copying pygraphviz\graphviz.py -> build\lib.win32-2.7\pygraphviz
  copying pygraphviz\release.py -> build\lib.win32-2.7\pygraphviz
  copying pygraphviz\version.py -> build\lib.win32-2.7\pygraphviz
  copying pygraphviz\__init__.py -> build\lib.win32-2.7\pygraphviz
  creating build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_attributes.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_clear.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_drawing.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_graph.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_html.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_layout.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_node_attributes.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_readwrite.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_string.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_subgraph.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\test_unicode.py -> build\lib.win32-2.7\pygraphviz\tests
  copying pygraphviz\tests\__init__.py -> build\lib.win32-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
  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.win32-2.7\pygraphviz
  copying pygraphviz\graphviz_wrap.c -> build\lib.win32-2.7\pygraphviz
  running build_ext
  building 'pygraphviz._graphviz' extension
  error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

  ----------------------------------------
  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 c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\cnh004\\appdata\\local\\temp\\pip-build-onw9wy\\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\cnh004\appdata\local\temp\pip-wa7pph-record\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.win32-2.7
    creating build\lib.win32-2.7\pygraphviz
    copying pygraphviz\agraph.py -> build\lib.win32-2.7\pygraphviz
    copying pygraphviz\graphviz.py -> build\lib.win32-2.7\pygraphviz
    copying pygraphviz\release.py -> build\lib.win32-2.7\pygraphviz
    copying pygraphviz\version.py -> build\lib.win32-2.7\pygraphviz
    copying pygraphviz\__init__.py -> build\lib.win32-2.7\pygraphviz
    creating build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_attributes.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_clear.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_drawing.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_graph.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_html.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_layout.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_node_attributes.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_readwrite.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_string.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_subgraph.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\test_unicode.py -> build\lib.win32-2.7\pygraphviz\tests
    copying pygraphviz\tests\__init__.py -> build\lib.win32-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
    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.win32-2.7\pygraphviz
    copying pygraphviz\graphviz_wrap.c -> build\lib.win32-2.7\pygraphviz
    running build_ext
    building 'pygraphviz._graphviz' extension
    error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\cnh004\\appdata\\local\\temp\\pip-build-onw9wy\\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\cnh004\appdata\local\temp\pip-wa7pph-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\cnh004\appdata\local\temp\pip-build-onw9wy\pygraphviz\

我也查看了solution given for Mac,但当我尝试按照建议安装cgraph时,它再次显示为Failed building wheel for cgraph。如果任何人有任何建议,将不胜感激。谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-08-01 02:05:30

代码语言:javascript
复制
Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

完美的不言自明的解释,甚至包括一个解决方案。另请参阅https://wiki.python.org/moin/WindowsCompilershttps://stackoverflow.com/a/18045219/7976758

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

https://stackoverflow.com/questions/45420188

复制
相关文章

相似问题

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