Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where do I find libcgraph? #86

Closed
Ahmed opened this issue Jan 5, 2016 · 2 comments
Closed

Where do I find libcgraph? #86

Ahmed opened this issue Jan 5, 2016 · 2 comments

Comments

@Ahmed
Copy link

Ahmed commented Jan 5, 2016

Hi:

I'm trying to install pygraphviz on my CentOS7 machine, however, when I try it I get the following error

[root@localhost pygraphviz-1.3.1]# python setup.py install
running install
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
Traceback (most recent call last):
  File "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 "/tmp/viz/pygraphviz-1.3.1/setup_commands.py", line 44, in modified_run
    self.include_path, self.library_path = get_graphviz_dirs()
  File "/tmp/viz/pygraphviz-1.3.1/setup_extra.py", line 121, in get_graphviz_dirs
    include_dirs, library_dirs = _pkg_config()
  File "/tmp/viz/pygraphviz-1.3.1/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

I have the following repos on my yum directory.

[root@localhost pygraphviz-1.3.1]# ls /etc/yum.repos.d/
adobe-linux-x86_64.repo  CentOS-Debuginfo.repo  CentOS-Vault.repo   epel.repo           google-talkplugin.repo   mysql-community-source.repo
CentOS-Base.repo         CentOS-fasttrack.repo  docker-main.repo    epel-testing.repo   logstash-forwarder.repo  nux-dextop.repo
CentOS-CR.repo           CentOS-Sources.repo    elasticsearch.repo  google-chrome.repo  mysql-community.repo     slack.repo

When I try to look for a package for a libcgraph, yum couldn't find it.

[root@localhost pygraphviz-1.3.1]# yum search libcgraph
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * epel: reflector.westga.edu
 * extras: mirror.netdepot.com
 * nux-dextop: mirror.li.nux.ro
 * updates: mirror.netdepot.com
Warning: No matches found for: libcgraph
No matches found
[root@localhost pygraphviz-1.3.1]# yum search libcgvc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * epel: reflector.westga.edu
 * extras: mirror.netdepot.com
 * nux-dextop: mirror.li.nux.ro
 * updates: mirror.netdepot.com
Warning: No matches found for: libcgvc
No matches found

Also, when I try to install pygraphviz via pip, I still get an error. Example:

[root@localhost pygraphviz-1.3.1]# pip install pygraphviz
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-e1zoFI/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BW6Hsy-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-e1zoFI/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-e1zoFI/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BW6Hsy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-e1zoFI/pygraphviz

Where do I find libcgraph source code, or how to do I install pygraphviz on CentOS 7?

@r-barnes
Copy link

r-barnes commented Mar 5, 2016

I there a graphviz package? On Debian this installs libcgraph6. I then get the same problem you do.

@hagberg
Copy link
Contributor

hagberg commented Mar 5, 2016

You need both the main graphvz package and the development package. For Debian that is probably graphviz-dev and for CentOS try graphviz-devel.

@hagberg hagberg closed this as completed Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants