如何在 Windows 10 64 位上安装 pygraphviz [英] howto install pygraphviz on windows 10 64bit

查看:36
本文介绍了如何在 Windows 10 64 位上安装 pygraphviz的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人成功地在 Windows 10 64 位上安装 pygraphviz?我用 python 3.5 64bit & 尝试了 anaconda32位没有成功.

Has anyone succeeded in installing pygraphviz on windows 10 64bit? I tried anaconda with python 3.5 64bit & 32bit with no success.

这是我在 win10 64bit 上使用 python 3.5 32bit 遇到的错误

Here is the error I am getting with python 3.5 32bit on win10 64bit

python -m pip install pygraphviz --install-option="--include-path=C:Program Files (x86)Graphviz2.38include" --install-option="--library-path=C:Program Files (x86)Graphviz2.38lib"

错误:

C:Program Files (x86)Microsoft Visual Studio 14.0VCBINcl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:Program Files (x86)Graphviz2.38include" -IC:Users	ra20Anaconda3include -IC:Users	ra20Anaconda3include "-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE" "-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt" "-IC:Program Files (x86)Windows Kits8.1includeshared" "-IC:Program Files (x86)Windows Kits8.1includeum" "-IC:Program Files (x86)Windows Kits8.1includewinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild	emp.win32-3.5Releasepygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(3321): warning C4047: 'return': 'int' differs in levels of indirection from 'Agsym_t *'
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINlink.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:Program Files (x86)Graphviz2.38lib" /LIBPATH:C:Users	ra20Anaconda3libs /LIBPATH:C:Users	ra20Anaconda3PCbuildwin32 "/LIBPATH:C:Program Files (x86)Microsoft Visual Studio 14.0VCLIB" "/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.10240.0ucrtx86" "/LIBPATH:C:Program Files (x86)Windows Kits8.1libwinv6.3umx86" cgraph.lib cdt.lib /EXPORT:PyInit__graphviz build	emp.win32-3.5Releasepygraphviz/graphviz_wrap.obj /OUT:buildlib.win32-3.5pygraphviz\_graphviz.cp35-win32.pyd /IMPLIB:build	emp.win32-3.5Releasepygraphviz\_graphviz.cp35-win32.lib
LINK : fatal error LNK1181: cannot open input file 'cgraph.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe' failed with exit status 1181

我认为这与 graphviz 以 32 位链接的事实有关?

I assume it has something to do with the fact graphviz is linked in 32bit?

注意 - 我尝试了所有可以在互联网(anaconda,互联网)上找到的 pygraphviz 二进制文件,但在 win10 64 位上没有任何工作......如果你有任何工作(我的意思是你真的测试过它),我也会很高兴...

Note - I tried all binary for pygraphviz i could found on internet(anaconda,internet), and none work on win10 64bit... if you have any working (i mean you realy tested it ) i would be also happy ...

推荐答案

从这里开始阅读https://github.com/pygraphviz/pygraphviz/issues/58

在该页面的底部有一个指向 Github 中 x64 zip 文件的链接(例如 这个)拆开那个.为您的 x64 文件创建一个相应的 Program Files 文件夹并将它们放在那里

At the bottom of that page there is a link to a x64 zip file in Github (like this) Unpack that. Create a coresponding Program Files folder for your x64 file and put them there

然后使用这个安装

pip install --global-option=build_ext --global-option="-IC:Program FilesGraphviz2.38include" --global-option="-LC:Program FilesGraphviz2.38lib" pygraphviz

这篇关于如何在 Windows 10 64 位上安装 pygraphviz的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆