python - pip install pygraphviz: No package 'libcgraph' found -


i succeed in installing graphviz , cgraph with

$ sudo pip install graphviz .... installed graphviz-0.5.1  $ sudo pip install cgraph ... installed cgraph-0.1 

i encounter issue no package 'libcgraph' found while running sudo pip install pygraphviz. below full stacktrace.

$ sudo pip install pygraphviz directory '/users/sparkandshine/library/caches/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. directory '/users/sparkandshine/library/caches/pip' or parent directory not owned current user , caching wheels has been disabled. check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. collecting pygraphviz   downloading pygraphviz-1.3.1.zip (123kb)     100% |████████████████████████████████| 133kb 1.5mb/s  installing collected packages: pygraphviz   running setup.py install pygraphviz ... error     complete output command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-qffpfg/pygraphviz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jmwja6-record/install-record.txt --single-version-externally-managed --compile:     running install     trying pkg-config     package libcgraph not found in pkg-config search path.     perhaps should add directory containing `libcgraph.pc'     pkg_config_path environment variable     no package 'libcgraph' found     traceback (most recent call last):       file "<string>", line 1, in <module>       file "/private/tmp/pip-build-qffpfg/pygraphviz/setup.py", line 87, in <module>         tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],       file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup         dist.run_commands()       file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands         self.run_command(cmd)       file "/system/library/frameworks/python.framework/versions/2.7/lib/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 "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/subprocess.py", line 573, 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 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-qffpfg/pygraphviz/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jmwja6-record/install-record.txt --single-version-externally-managed --compile" failed error code 1 in /private/tmp/pip-build-qffpfg/pygraphviz/ 

i tried solutions provided python not see pygraphviz, doesn't work.

sudo apt-get install python-dev graphviz libgraphviz-dev pkg-config 

then

sudo pip install pygraphviz 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -