Hi,
I am trying to install ns3 in RHEL7 by following the instructions on the nsnam website. I am unable to install the pygraphviz package required for visualization.
Here is what I get when I do easy_install pygraphviz:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Searching for pygraphviz
Reading
https://pypi.python.org/simple/pygraphviz/Best match: pygraphviz 1.3.1
Downloading
https://pypi.python.org/packages/source/p/pygraphviz/pygraphviz-1.3.1.zip#md5=b2a5b69fe8ff969949d4b9bb9dd2974dProcessing pygraphviz-1.3.1.zip
Writing /tmp/easy_install-KF5zPx/pygraphviz-1.3.1/setup.cfg
Running pygraphviz-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-KF5zPx/pygraphviz-1.3.1/egg-dist-tmp-vkBORr
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'
pygraphviz/graphviz_wrap.c:2954:29: fatal error: graphviz/cgraph.h: No such file or directory
#include "graphviz/cgraph.h"
^
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I have installed graphviz by adding
graphviz-rhel.repo to yum and then
yum list available 'graphviz*'
yum install 'graphviz*'
I tried pip install pygraphviz but it again failed. Here is the traceback:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Collecting pygraphviz
Using cached pygraphviz-1.3.1.tar.gz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-72tW1N/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tvsYNp-record/install-record.txt --single-version-externally-managed --compile:
running install
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
No package 'libcgraph' found
Trying pkg-config
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-72tW1N/pygraphviz/setup.py", line 87, in <module>
tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup_commands.py", line 44, in modified_run
self.include_path, self.library_path = get_graphviz_dirs()
File "setup_extra.py", line 121, in get_graphviz_dirs
include_dirs, library_dirs = _pkg_config()
File "setup_extra.py", line 44, in _pkg_config
output = S.check_output(['pkg-config', '--libs-only-L', 'libcgraph'])
File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pkg-config', '--libs-only-L', 'libcgraph']' returned non-zero exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-72tW1N/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tvsYNp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-72tW1N/pygraphviz
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I also tried to manually install using python setup.py install and again failed with the following error message.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
No package 'libcgraph' found
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
No package 'libcgraph' found
Trying dotneato-config
Failed to find dotneato-config
Your Graphviz installation could not be found.
1) You don't have Graphviz installed:
Install Graphviz (
http://graphviz.org)
2) Your Graphviz package might incomplete.
Install the binary development subpackage (e.g. libgraphviz-dev or similar.)
3) You are using Windows
There are no PyGraphviz binary packages for Windows but you might be
able to build it from this source. See
http://networkx.lanl.gov/pygraphviz/reference/faq.htmlIf you think your installation is correct you will need to manually
change the include_path and library_path variables in setup.py to
point to the correct locations of your graphviz installation.
The current setting of library_path and include_path is:
library_path=None
include_path=None
Traceback (most recent call last):
File "setup.py", line 89, in <module>
raise OSError,"Error locating graphviz."
OSError: Error locating graphviz.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I think everything is tied back to graphviz package but I am unable to figure out anything. Could anyone help me with this issue?
Thank you for your time.