cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1233
Views
0
Helpful
3
Replies

ACITOOLKIT installation of Pygraphviz

johbarbe
Cisco Employee
Cisco Employee

Hello,

 

I'm Running into the following errors when trying to install Pygraphviz in CentOS:

 

(venv) [johbarbe@localhost acitoolkit]$ pip install pygraphviz
Collecting pygraphviz
Downloading pygraphviz-1.7.zip (118 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.8/118.8 KB 8.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pygraphviz, since package 'wheel' is not installed.
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz ... error
error: subprocess-exited-with-error

× Running setup.py install for pygraphviz did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/pygraphviz
copying pygraphviz/scraper.py -> build/lib.linux-x86_64-3.7/pygraphviz
copying pygraphviz/testing.py -> build/lib.linux-x86_64-3.7/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.linux-x86_64-3.7/pygraphviz
copying pygraphviz/agraph.py -> build/lib.linux-x86_64-3.7/pygraphviz
copying pygraphviz/__init__.py -> build/lib.linux-x86_64-3.7/pygraphviz
creating build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_close.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.linux-x86_64-3.7/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
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 '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 -fPIC -I/home/johbarbe/aci-learning-labs-code-samples/venv/include -I/usr/local/include/python3.7m -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-3.7/pygraphviz/graphviz_wrap.o
In file included from /usr/include/graphviz/gvc.h:17:0,
from pygraphviz/graphviz_wrap.c:2712:
/usr/include/graphviz/types.h:49:20: fatal error: cgraph.h: No such file or directory
#include <cgraph.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pygraphviz

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

 

I've tried numerous solutions including installing Wheel. 

 

I followed the instructions here:

https://developer.cisco.com/learning/modules/intro-to-aci/sbx-intro-aci-03_aci-toolkit/step/1

"How To Setup Your Own Computer"

 

Thank you and any help would be greatly appreciated!  Python version is 3.7.5

3 Replies 3

Alexander Stevenson
Cisco Employee
Cisco Employee

 

Hello @johbarbe,

 

Try pip3 install instead of pip install (I'm assuming you're working with Python3). This has worked for me in installing various applications in the past that failed with pip install.

 

Best,

      Alex S.

Alexander Stevenson
Cisco Employee
Cisco Employee

This line is telling us something:

 

Using legacy 'setup.py install' for pygraphviz, since package 'wheel' is not installed.

 

Last week I had an install fail exactly like this and I installed wheel and then installed the package with wheel and it worked. I hope it can work for you too.

Ruben Cocheno
Spotlight
Spotlight

@johbarbe 

Has this been resolved?

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/