【问题标题】:install pygraphviz on anaconda error在 anaconda 错误上安装 pygraphviz
【发布时间】:2015-02-26 21:33:43
【问题描述】:

我尝试在 Anaconda 上安装 pygraphviz。我已经完成了我发现的所有事情:

- install graphviz.
- install mingw.
- change values in the setup.py for pygraphviz as below:
   include_dirs = 'C:/Program Files (x86)/Graphviz2.38/include/graphviz'
   library_dirs = 'C:/Program Files (x86)/Graphviz2.38/lib'
-  run python setup.py build -c mingw32 install. 

在第 4 步之后,我收到以下错误:

running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
C:\MinGW\bin\gcc.exe -mdll -O -Wall -DGVDLL "-IC:/Program Files (x86)/Graphviz2.38/include/graphviz" -IC:\Users\garre_000\Anaconda3\
include -IC:\Users\garre_000\Anaconda3\include -c pygraphviz/graphviz_wrap.c -o build\temp.win-amd64-3.4\Release\pygraphviz\graphviz
_wrap.o
pygraphviz/graphviz_wrap.c:2954:29: fatal error: graphviz/cgraph.h: No such file or directory
 #include "graphviz/cgraph.h"
                             ^
compilation terminated.
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1

谁能给我一些建议?

【问题讨论】:

  • 您的包含路径是否正确?也许应该是 include_dirs = 'C:/Program Files (x86)/Graphviz2.38/include'?
  • 我想通了。我从 python 3.3 切换到 python 2.7。它工作得很好。谢谢

标签: python pygraphviz


【解决方案1】:

我刚刚遇到了同样的问题。包含路径不正确。使用

include_dirs = 'C:/Program Files (x86)/Graphviz2.38/include'

相反。否则你会得到 ​​p>

'C:/Program Files (x86)/Graphviz2.38/include/graphviz/graphviz/cgraph.h'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-01
    • 1970-01-01
    • 2011-06-02
    • 2023-04-03
    • 1970-01-01
    • 2022-11-22
    • 1970-01-01
    • 2012-01-03
    相关资源
    最近更新 更多