如何在Windows 10 64bit上安装pygraphviz [英] howto install pygraphviz on windows 10 64bit
问题描述
有人成功在Windows 10 64bit上安装pygraphviz吗?我在python 3.5 64bit&中尝试了蟒蛇32bit没有成功。
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.38\include" --install-option="--library-path=C:\Program Files (x86)\Graphviz2.38\lib"
错误:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Graphviz2.38\include" -IC:\Users\tra20\Anaconda3\include -IC:\Users\tra20\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win32-3.5\Release\pygraphviz/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.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files (x86)\Graphviz2.38\lib" /LIBPATH:C:\Users\tra20\Anaconda3\libs /LIBPATH:C:\Users\tra20\Anaconda3\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86" cgraph.lib cdt.lib /EXPORT:PyInit__graphviz build\temp.win32-3.5\Release\pygraphviz/graphviz_wrap.obj /OUT:build\lib.win32-3.5\pygraphviz\_graphviz.cp35-win32.pyd /IMPLIB:build\temp.win32-3.5\Release\pygraphviz\_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?
注意-我尝试了pygraphviz的所有二进制文件,我可以在Internet(anaconda,internet)上找到它,而在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文件的文件夹并将其放置在其中
At the bottom of that page there is a link to a x64 zip file in Github (like this) Unpack that create a the coresponding Program Files folder for your x64 file and put them there
然后使用此文件进行安装
Then install using this
pip install --global-option=build_ext --global-option="-IC:\Program Files\Graphviz2.38\include" --global-option="-LC:\Program Files\Graphviz2.38\lib\release\lib" pygraphviz
这篇关于如何在Windows 10 64bit上安装pygraphviz的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!