Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
373 views
in Technique[技术] by (71.8m points)

python - howto install pygraphviz on windows 10 64bit

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

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"

Error:

C:Program Files (x86)Microsoft Visual Studio 14.0VCBINcl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:Program Files (x86)Graphviz2.38include" -IC:Usersra20Anaconda3include -IC:Usersra20Anaconda3include "-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 /Fobuildemp.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:Usersra20Anaconda3libs /LIBPATH:C:Usersra20Anaconda3PCbuildwin32 "/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 buildemp.win32-3.5Releasepygraphviz/graphviz_wrap.obj /OUT:buildlib.win32-3.5pygraphviz\_graphviz.cp35-win32.pyd /IMPLIB:buildemp.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

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

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 ...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've created a build of PyGraphviz 1.5 on my Anaconda channel for Windows 64 bit running Python 3.6 through 3.9. If you're running Anaconda, you can install with:

conda install -c alubbock pygraphviz

This will also install Graphviz 2.41 as a dependency (don't install it separately, it might conflict and not all versions are 64-bit compatible).

I don't currently have a version for Python 3.5 or 32-bit versions of Windows, but I hope the above helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...