Pygraphviz install error

Hi, after several tries, I'm getting the following error trying to install pygraphviz in Windows 10: > python -m pip install --global-option=build_ext --global-option="-IC:Program File...

Hi, after several tries, I’m getting the following error trying to install pygraphviz in Windows 10:

> python -m pip install --global-option=build_ext --global-option="-IC:Program Files (x86)Graphviz2.38include"  --global-option="-LC:Program Files (x86)Graphviz2.38libreleaselib" pygraphviz
C:UsersDiegoAppDataLocalProgramsPythonPython37libsite-packagespip_internalcommandsinstall.py:244: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting pygraphviz
  Using cached https://files.pythonhosted.org/packages/7e/b1/d6d849ddaf6f11036f9980d433f383d4c13d1ebcfc3cd09bc845bda7e433/pygraphviz-1.5.zip
Skipping bdist_wheel for pygraphviz, due to binaries being disabled for it.
Installing collected packages: pygraphviz
  Running setup.py install for pygraphviz ... error
    ERROR: Complete output from command 'C:UsersDiegoAppDataLocalProgramsPythonPython37python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\Diego\AppData\Local\Temp\pip-install-atfo7bih\pygraphviz\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' build_ext '-IC:Program Files (x86)Graphviz2.38include' '-LC:Program Files (x86)Graphviz2.38libreleaselib' install --record 'C:UsersDiegoAppDataLocalTemppip-record-ozhk54kvinstall-record.txt' --single-version-externally-managed --compile:
    ERROR: running build_ext
    building 'pygraphviz._graphviz' extension
    creating build
    creating buildtemp.win-amd64-3.7
    creating buildtemp.win-amd64-3.7Release
    creating buildtemp.win-amd64-3.7Releasepygraphviz
    C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:Program Files (x86)Graphviz2.38include" -IC:UsersDiegoAppDataLocalProgramsPythonPython37include -IC:UsersDiegoAppDataLocalProgramsPythonPython37include "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508include" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0um" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuildtemp.win-amd64-3.7Releasepygraphviz/graphviz_wrap.obj
    graphviz_wrap.c
    pygraphviz/graphviz_wrap.c(3328): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
    pygraphviz/graphviz_wrap.c(3346): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
    pygraphviz/graphviz_wrap.c(3354): warning C4047: 'return': 'int' differs in levels of indirection from 'Agsym_t *'
    creating C:UsersDiegoAppDataLocalTemppip-install-atfo7bihpygraphvizbuildlib.win-amd64-3.7
    creating C:UsersDiegoAppDataLocalTemppip-install-atfo7bihpygraphvizbuildlib.win-amd64-3.7pygraphviz
    C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508binHostX86x64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:Program Files (x86)Graphviz2.38libreleaselib" /LIBPATH:C:UsersDiegoAppDataLocalProgramsPythonPython37libs /LIBPATH:C:UsersDiegoAppDataLocalProgramsPythonPython37PCbuildamd64 "/LIBPATH:C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508libx64" "/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.17763.0ucrtx64" "/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.17763.0umx64" cdt.lib cgraph.lib /EXPORT:PyInit__graphviz buildtemp.win-amd64-3.7Releasepygraphviz/graphviz_wrap.obj /OUT:buildlib.win-amd64-3.7pygraphviz_graphviz.cp37-win_amd64.pyd /IMPLIB:buildtemp.win-amd64-3.7Releasepygraphviz_graphviz.cp37-win_amd64.lib
       Creating library buildtemp.win-amd64-3.7Releasepygraphviz_graphviz.cp37-win_amd64.lib and object buildtemp.win-amd64-3.7Releasepygraphviz_graphviz.cp37-win_amd64.exp
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agwrite
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agisdirected
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agopen
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agraphof
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnxtin
    graphviz_wrap.obj : error LNK2001: unresolved external symbol aglstnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agedge
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agsubedge
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agisundirected
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnxtnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agidnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnxtsubg
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agisstrict
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agattrsym
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agfstin
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agattr
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agstrdup_html
    graphviz_wrap.obj : error LNK2001: unresolved external symbol Agdirected
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnameof
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agfstnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agget
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agdegree
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agfstedge
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agdelsubg
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agdelnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnxtattr
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agread
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agparent
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agxset
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agclose
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agidedge
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agroot
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agfstsubg
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agdeledge
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnnodes
    graphviz_wrap.obj : error LNK2001: unresolved external symbol Agundirected
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agxget
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agsubnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnxtedge
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agsubg
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnedges
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agset
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agfstout
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agsafeset
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agprvnode
    graphviz_wrap.obj : error LNK2001: unresolved external symbol Agstrictundirected
    graphviz_wrap.obj : error LNK2001: unresolved external symbol PyIOBase_Type
    graphviz_wrap.obj : error LNK2001: unresolved external symbol agnxtout
    graphviz_wrap.obj : error LNK2001: unresolved external symbol Agstrictdirected
    buildlib.win-amd64-3.7pygraphviz_graphviz.cp37-win_amd64.pyd : fatal error LNK1120: 50 unresolved externals
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\link.exe' failed with exit status 1120
    ----------------------------------------
ERROR: Command "'C:UsersDiegoAppDataLocalProgramsPythonPython37python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\Diego\AppData\Local\Temp\pip-install-atfo7bih\pygraphviz\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' build_ext '-IC:Program Files (x86)Graphviz2.38include' '-LC:Program Files (x86)Graphviz2.38libreleaselib' install --record 'C:UsersDiegoAppDataLocalTemppip-record-ozhk54kvinstall-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:UsersDiegoAppDataLocalTemppip-install-atfo7bihpygraphviz

Содержание

  1. Error on install of pygraphviz #207
  2. Comments
  3. failed building wheel for pygraphviz #163
  4. Comments
  5. Not able to install pygraphviz #156
  6. Comments
  7. Unhelpful Error Message on Install #192
  8. Comments
  9. Environment:
  10. Footer

Error on install of pygraphviz #207

I’m having trouble installing pygraphviz using pip. The specific errors I’m getting are:

error: command ‘C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.24.28314binHostX86x86cl.exe’ failed with exit status 2

ERROR: Command errored out with exit status 1: ‘c:usersadminappdatalocalprogramspythonpython38-32python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘C:UsersAdminAppDataLocalTemppip-install-xr2cxn6tpygraphvizsetup.py’»‘»‘; file=’»‘»‘C:UsersAdminAppDataLocalTemppip-install-xr2cxn6tpygraphvizsetup.py’»‘»‘;f=getattr(tokenize, ‘»‘»‘open’»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn’»‘»‘, ‘»‘»‘n’»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec’»‘»‘))’ install —record ‘C:UsersAdminAppDataLocalTemppip-record-464u_dncinstall-record.txt’ —single-version-externally-managed —compile Check the logs for full command output.

Any idea on how to fix this?

The text was updated successfully, but these errors were encountered:

Not enough information. Please run pip install -vvv pygraphviz and paste the full log.

Not enough information. Please run pip install -vvv pygraphviz and paste the full log.

C:>pip install -vvv pygraphviz
Created temporary directory: C:UsersAdminAppDataLocalTemppip-ephem-wheel-cache-4ehmtk0n
Created temporary directory: C:UsersAdminAppDataLocalTemppip-req-tracker-sr135kq_
Created requirements tracker ‘C:UsersAdminAppDataLocalTemppip-req-tracker-sr135kq_’
Created temporary directory: C:UsersAdminAppDataLocalTemppip-install-j2_h3p8r
1 location(s) to search for versions of pygraphviz:

Источник

failed building wheel for pygraphviz #163

Hello,
I tried installing pygraphviz using the comand pip3 install git+git://github.com/pygraphviz/pygraphviz.git but it raises
`
Collecting git+git://github.com/pygraphviz/pygraphviz.git
Cloning git://github.com/pygraphviz/pygraphviz.git to c:userskaoutherappdatalocaltemppip-req-build-3w79axlv
Building wheels for collected packages: pygraphviz
Running setup.py bdist_wheel for pygraphviz . error
Complete output from command C:UsersKAOUTHERPycharmProjectschatbotvenvScriptspython.exe -u -c «import setuptools, tokenize;file=’C:UsersKAOUTHERAppDa
taLocalTemppip-req-build-3w79axlvsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file
, ‘exec’))» bdist_wheel -d C:UsersKAOUTHERAppDataLocalTemppip-wheel-vg5o6x6n —python-tag cp36:
C:UsersKAOUTHERPycharmProjectschatbotvenvlibsite-packagessetuptools-39.1.0-py3.6.eggsetuptoolsdist.py:388: UserWarning: Normalizing ‘1.5.dev’ to ‘1.5.dev0’
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win-amd64-3.6
creating buildlib.win-amd64-3.6pygraphviz
copying pygraphvizagraph.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizgraphviz.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizrelease.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizversion.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphviz_init_.py -> buildlib.win-amd64-3.6pygraphviz
creating buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_attributes.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_attribute_defaults.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_clear.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_drawing.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_edge_attributes.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_graph.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_html.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_layout.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_node_attributes.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_readwrite.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_setup.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_string.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_subgraph.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_unicode.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphviztests_init_.py -> buildlib.win-amd64-3.6pygraphviztests
running egg_info
creating pygraphviz.egg-info
writing pygraphviz.egg-infoPKG-INFO
writing dependency_links to pygraphviz.egg-infodependency_links.txt
writing top-level names to pygraphviz.egg-infotop_level.txt
writing manifest file ‘pygraphviz.egg-infoSOURCES.txt’
reading manifest file ‘pygraphviz.egg-infoSOURCES.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 ‘docbuild’
writing manifest file ‘pygraphviz.egg-infoSOURCES.txt’
copying pygraphvizgraphviz.i -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizgraphviz_wrap.c -> buildlib.win-amd64-3.6pygraphviz
running build_ext
building ‘pygraphviz._graphviz’ extension
creating buildtemp.win-amd64-3.6
creating buildtemp.win-amd64-3.6Release
creating buildtemp.win-amd64-3.6Releasepygraphviz
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.14.26428binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:UsersKAOUTHE
RPycharmProjectschatbotvenvinclude -IC:UsersKAOUTHERAnaconda3include -IC:UsersKAOUTHERAnaconda3include «-IC:Program Files (x86)Microsoft Visual Studio201
7BuildToolsVCToolsMSVC14.14.26428include» «-IC:Program Files (x86)Windows Kits10include10.0.17134.0ucrt» «-IC:Program Files (x86)Windows Kits10include1
0.0.17134.0shared» «-IC:Program Files (x86)Windows Kits10include10.0.17134.0um» «-IC:Program Files (x86)Windows Kits10include10.0.17134.0winrt» «-IC:Progr
am Files (x86)Windows Kits10include10.0.17134.0cppwinrt» /Tcpygraphviz/graphviz_wrap.c /Fobuildtemp.win-amd64-3.6Releasepygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(2987): fatal error C1083: Impossible d’ouvrir le fichier includeÿ: ‘graphviz/cgraph.h’ÿ: No such file or directory
error: command ‘C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.14.26428binHostX86x64cl.exe’ failed with exit status 2

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:UsersKAOUTHERPycharmProjectschatbotvenvScriptspython.exe -u -c «import setuptools, tokenize;file=’C:UsersKAOUTHERApp
DataLocalTemppip-req-build-3w79axlvsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, __file
, ‘exec’))» install —record C:UsersKAOUTHERAppDataLocalTemppip-record-c0zdl1xfinstall-record.txt —single-version-externally-managed —compile —install-heade
rs C:UsersKAOUTHERPycharmProjectschatbotvenvincludesitepython3.6pygraphviz:
C:UsersKAOUTHERPycharmProjectschatbotvenvlibsite-packagessetuptools-39.1.0-py3.6.eggsetuptoolsdist.py:388: UserWarning: Normalizing ‘1.5.dev’ to ‘1.5.dev0

running install
include_dirs=None
library_dirs=None
running build
running build_py
creating build
creating buildlib.win-amd64-3.6
creating buildlib.win-amd64-3.6pygraphviz
copying pygraphvizagraph.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizgraphviz.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizrelease.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizversion.py -> buildlib.win-amd64-3.6pygraphviz
copying pygraphviz_init
.py -> buildlib.win-amd64-3.6pygraphviz
creating buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_attributes.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_attribute_defaults.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_clear.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_drawing.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_edge_attributes.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_graph.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_html.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_layout.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_node_attributes.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_readwrite.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_setup.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_string.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_subgraph.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphvizteststest_unicode.py -> buildlib.win-amd64-3.6pygraphviztests
copying pygraphviztests_init
.py -> buildlib.win-amd64-3.6pygraphviztests
running egg_info
writing pygraphviz.egg-infoPKG-INFO
writing dependency_links to pygraphviz.egg-infodependency_links.txt
writing top-level names to pygraphviz.egg-infotop_level.txt
reading manifest file ‘pygraphviz.egg-infoSOURCES.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 ‘docbuild’
writing manifest file ‘pygraphviz.egg-infoSOURCES.txt’
copying pygraphvizgraphviz.i -> buildlib.win-amd64-3.6pygraphviz
copying pygraphvizgraphviz_wrap.c -> buildlib.win-amd64-3.6pygraphviz
running build_ext
building ‘pygraphviz._graphviz’ extension
creating buildtemp.win-amd64-3.6
creating buildtemp.win-amd64-3.6Release
creating buildtemp.win-amd64-3.6Releasepygraphviz
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.14.26428binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:UsersKAOUT
HERPycharmProjectschatbotvenvinclude -IC:UsersKAOUTHERAnaconda3include -IC:UsersKAOUTHERAnaconda3include «-IC:Program Files (x86)Microsoft Visual Studio2
017BuildToolsVCToolsMSVC14.14.26428include» «-IC:Program Files (x86)Windows Kits10include10.0.17134.0ucrt» «-IC:Program Files (x86)Windows Kits10include
10.0.17134.0shared» «-IC:Program Files (x86)Windows Kits10include10.0.17134.0um» «-IC:Program Files (x86)Windows Kits10include10.0.17134.0winrt» «-IC:Pro
gram Files (x86)Windows Kits10include10.0.17134.0cppwinrt» /Tcpygraphviz/graphviz_wrap.c /Fobuildtemp.win-amd64-3.6Releasepygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(2987): fatal error C1083: Impossible d’ouvrir le fichier includeÿ: ‘graphviz/cgraph.h’ÿ: No such file or directory
error: command ‘C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.14.26428binHostX86x64cl.exe’ failed with exit status
2

`
I am using Anaconda python 3 under Windows 10
Any idea?

The text was updated successfully, but these errors were encountered:

Источник

Not able to install pygraphviz #156

I am not able to install pygraphviz on windows 10 64 bit

I am running pip install —global-option=build_ext —global-option=»-IC:Program FilesGraphviz2.38include» —global-option=»-LC:Program FilesGraphviz2.38libreleaselib» pygraphviz

The text was updated successfully, but these errors were encountered:

Same thing with me. trying to use networkx which uses graphviz. I have graphviz installed. I have spent the whole day trying to resolve this.
OS: win 10
Py: 3.65

I have tried this
Python37-32Scripts>pip install git+https://github.com/pygraphviz/pygraphviz.git —install-option=»—include-path=C:/Program Files (x86)/Graphviz2.38/include» —install-option=»—library-path=C:/Program Files (x86)/Graphviz2.38/lib/release/lib»

Which solved the problems with the include and lib files but now I am getting this

graphviz_wrap.obj : error LNK2001: unresolved external symbol _PyIOBase_Type
buildlib.win32-3.7pygraphviz_graphviz.cp37-win32.pyd : fatal error LNK1120: 1 unresolved externals
error: command ‘C:Program Files (x86)Microsoft Visual Studio 14.0VCBINlink.exe’ failed with exit status 1120

The only reference to the above issue is a patch mentioned at the end of this thread

I have no idea how to apply that patch on Windows

Источник

Unhelpful Error Message on Install #192

Environment:

First i installed graphviz using pacman

While installing pygraphviz via pip

I got the following error message

The text was updated successfully, but these errors were encountered:

I performed a full system upgrade, rebooted and re-installed both and it happened to fix the issue

however I came across a similar error when I install pygraphviz before graphviz
and I think that should give a more helpful error message such as
Error Occurred! Make sure you have graphviz installed first

Installing pygraphviz without having graphviz previously installed gives

‘ 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.linux-x86_64-3.7/pygraphviz copying pygraphviz/graphviz_wrap.c -> build/lib.linux-x86_64-3.7/pygraphviz running build_ext building ‘pygraphviz._graphviz’ extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/pygraphviz gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I/usr/include/python3.7m -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-3.7/pygraphviz/graphviz_wrap.o pygraphviz/graphviz_wrap.c:2987:10: fatal error: graphviz/cgraph.h: No such file or directory #include «graphviz/cgraph.h» ^

compilation terminated. error: command ‘gcc’ failed with exit status 1 —————————————- 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 /usr/bin/python -u -c «import setuptools, tokenize;__file__=’/tmp/pip-install-kd2ae_w7/pygraphviz/setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, __file__, ‘exec’))» install —record /tmp/pip-record-ade7kch2/install-record.txt —single-version-externally-managed —compile: running install Trying dpkg Failed to find dpkg Trying pkg-config Package libcgraph was not found in the pkg-config search path. Perhaps you should add the directory containing `libcgraph.pc’ to the PKG_CONFIG_PATH environment variable Package ‘libcgraph’, required by ‘virtual:world’, not found Traceback (most recent call last): File » «, line 1, in File «/tmp/pip-install-kd2ae_w7/pygraphviz/setup.py», line 93, in tests_require=[‘nose>=1.3.7’, ‘doctest-ignore-unicode>=0.1.2’, ‘mock>=2.0.0’], File «/usr/lib/python3.7/site-packages/setuptools/__init__.py», line 145, in setup return distutils.core.setup(**attrs) File «/usr/lib/python3.7/distutils/core.py», line 148, in setup dist.run_commands() File «/usr/lib/python3.7/distutils/dist.py», line 966, in run_commands self.run_command(cmd) File «/usr/lib/python3.7/distutils/dist.py», line 985, in run_command cmd_obj.run() File «/tmp/pip-install-kd2ae_w7/pygraphviz/setup_commands.py», line 44, in modified_run self.include_path, self.library_path = get_graphviz_dirs() File «/tmp/pip-install-kd2ae_w7/pygraphviz/setup_extra.py», line 162, in get_graphviz_dirs include_dirs, library_dirs = _try_configure(include_dirs, library_dirs, _pkg_config) File «/tmp/pip-install-kd2ae_w7/pygraphviz/setup_extra.py», line 117, in _try_configure i, l = try_function() File «/tmp/pip-install-kd2ae_w7/pygraphviz/setup_extra.py», line 72, in _pkg_config output = S.check_output([‘pkg-config’, ‘—libs-only-L’, ‘libcgraph’]) File «/usr/lib/python3.7/subprocess.py», line 395, in check_output **kwargs).stdout File «/usr/lib/python3.7/subprocess.py», line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command ‘[‘pkg-config’, ‘—libs-only-L’, ‘libcgraph’]’ returned non-zero exit status 1. —————————————- Command «/usr/bin/python -u -c «import setuptools, tokenize;__file__=’/tmp/pip-install-kd2ae_w7/pygraphviz/setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, __file__, ‘exec’))» install —record /tmp/pip-record-ade7kch2/install-record.txt —single-version-externally-managed —compile» failed with error code 1 in /tmp/pip-install-kd2ae_w7/pygraphviz/»>

This problem does occur when graphviz is not installed first. But it also occurs whenever it can’t find the libcgraph package. That can happen when graphviz is installed somewhere that PKG_CONFIG_PATH doesn’t help find. So, the error message given is reasonable: it suggests that you add the location of ‘libcgraph.pc’ to the PKG_CONFIG_PATH. In doing so, you will determine that libcgraph.pc is not installed and thus that graphviz has not been installed. Putting a more descriptive error message is beyond the scope of pygraphviz as far as I know.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Note

This documents the development version of PyGraphviz. Documentation for the current release can be found here.

PyGraphviz requires:

  • Python (version 3.8, 3.9, or 3.10)

  • Graphviz (version 2.42 or later)

  • C/C++ Compiler

Note

These instructions assume you have Python and a C/C++ Compiler on your computer.

Warning

Do not use the default channels to install pygraphviz with conda. The
conda-forge channel should be used instead:

conda install --channel conda-forge pygraphviz
  • conda-forge-ubuntu-badge

  • conda-forge-macos-badge

  • conda-forge-windows-badge

Recommended¶

We recommend installing Python packages using pip and virtual environments.

Linux¶

We recommend installing Graphviz using your Linux system’s package manager.
Below are examples for some popular distributions.

Ubuntu and Debian¶

$ sudo apt-get install graphviz graphviz-dev
$ pip install pygraphviz

Fedora and Red Hat¶

You may need to replace dnf with yum in the example below.

$ sudo dnf install graphviz graphviz-devel
$ pip install pygraphviz

macOS¶

We recommend installing Graphviz using the Homebrew package manager or MacPorts for macOS.

Homebrew¶

$ brew install graphviz
$ pip install pygraphviz

MacPorts¶

$ port install graphviz
$ pip install pygraphviz
$ pip install --global-option=build_ext 
              --global-option="-I/opt/local/include/" 
              --global-option="-L/opt/local/lib/" 
              pygraphviz

Advanced¶

The two main difficulties are
  1. installing Graphviz and

  2. informing pip where Graphviz is installed.

Providing path to Graphviz¶

If you’ve installed Graphviz and pip is unable to find Graphviz, then you need to
provide pip with the path(s) where it can find Graphviz.
To do this, you first need to figure out where the binary files, includes files, and
library files for Graphviz are located on your file system.

Once you know where you’ve installed Graphviz, you will need to do something like
the following. There is an additional example using Chocolatey on Windows further
down the page.

Windows¶

Historically, installing Graphviz and PyGraphviz on Windows has been challenging.
Fortunately, the Graphviz developers are working to fix this and
their recent releases have much improved the situation.

For this reason, PyGraphviz 1.7 only supports Graphviz 2.46.0 or higher on Windows.
We recommend either manually installing the official binary release of Graphviz or
using Chocolatey, which has been updated to Graphviz 2.46.0.

You may also need to install Visual C/C++, e.g. from here:
https://visualstudio.microsoft.com/visual-cpp-build-tools/

Assuming you have Python and Visual C/C++ installed,
we believe the following should work on Windows 10 (64 bit) using PowerShell.

Manual download¶

  1. Download and install 2.46.0 for Windows 10 (64-bit):
    stable_windows_10_cmake_Release_x64_graphviz-install-2.46.0-win64.exe.

  2. Install PyGraphviz via

PS C:> python -m pip install --global-option=build_ext `
              --global-option="-IC:Program FilesGraphvizinclude" `
              --global-option="-LC:Program FilesGraphvizlib" `
              pygraphviz

Chocolatey¶

PS C:> choco install graphviz
PS C:> python -m pip install --global-option=build_ext `
              --global-option="-IC:Program FilesGraphvizinclude" `
              --global-option="-LC:Program FilesGraphvizlib" `
              pygraphviz

FAQ¶

Q

I followed the installation instructions but when I do:

I get an error like:

ImportError: libagraph.so.1: cannot open shared object file: No
such file or directory

What is wrong?

A

Some Unix systems don’t include the Graphviz library in the
default search path for the run-time linker. The path is often
something like /usr/lib/graphviz or /sw/lib/graphviz etc. and
it needs to be added to your search path.
On *nix systems, the preferred way to do this is by setting the
appropriate flags when building/installing pygraphviz.
For example, if the Graphviz libraries are installed in
/opt/lib/mygviz/ on your system:

pip install --global-option=build_ext 
            --global-option="-L/opt/lib/mygviz/" 
            --global-option="-R/opt/lib/mygviz/" 
            pygraphviz

In this example, the -L and -R flags tell the linker where to
look for the required Graphviz libraries at build time and run time,
respectively.

Q

How do I compile pygraphviz under Windows?

A

See Windows for the latest on how to
install Graphviz and pygraphviz on Windows.

Q

Why don’t you distribute a pygraphviz Windows installer?

A

We would very much like to make binary wheels available for pygraphviz,
but there are several complications.
pygraphviz is a wrapper around Graphviz, which means that Graphviz
must be installed, and Graphviz header files, libraries and command
line executables must all be accessible for the wrapper.
The recommended use of the Graphviz CLI poses challenges for wheel
packaging.

See also

This GitHub issue
for further discussion on wheels and packaging.

Понравилась статья? Поделить с друзьями:
  • Pygame error video system not initialized как исправить
  • Putty выдает ошибку network error connection refused
  • Pygame error unknown wave data format
  • Putty x11 proxy unable to connect to forwarded x server network error connection refused
  • Putty ubuntu network error connection refused