Ошибка установки Graphviz на MacBook Pro OS Sierra - PullRequest
0 голосов
/ 10 апреля 2019

Я пытаюсь установить pygraphviz с помощью pip, но получаю эту огромную ошибку:

Collecting pygraphviz
  Using cached https://files.pythonhosted.org/packages/7e/b1/d6d849ddaf6f11036f9980d433f383d4c13d1ebcfc3cd09bc845bda7e433/pygraphviz-1.5.zip
Installing collected packages: pygraphviz
  Running setup.py install for pygraphviz
    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 dpkg
    Failed to find dpkg
    Trying pkg-config
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-2nqbhW/pygraphviz/setup.py", line 93, in <module>
        tests_require=['nose>=1.3.7', 'doctest-ignore-unicode>=0.1.2', 'mock>=2.0.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 162, in get_graphviz_dirs
        include_dirs, library_dirs = _try_configure(include_dirs, library_dirs, _pkg_config)
      File "setup_extra.py", line 117, in _try_configure
        i, l = try_function()
      File "setup_extra.py", line 72, 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
    Complete output from command /Users/ciasto/virtualPyEnvs/netgraph/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-2nqbhW/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-D9iNeZ-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ciasto/virtualPyEnvs/netgraph/include/site/python2.7:
    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 dpkg

    Failed to find dpkg

    Trying pkg-config

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-2nqbhW/pygraphviz/setup.py", line 93, in <module>

        tests_require=['nose>=1.3.7', 'doctest-ignore-unicode>=0.1.2', 'mock>=2.0.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 162, in get_graphviz_dirs

        include_dirs, library_dirs = _try_configure(include_dirs, library_dirs, _pkg_config)

      File "setup_extra.py", line 117, in _try_configure

        i, l = try_function()

      File "setup_extra.py", line 72, 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 "/Users/ciasto/virtualPyEnvs/netgraph/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-2nqbhW/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-D9iNeZ-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ciasto/virtualPyEnvs/netgraph/include/site/python2.7" failed with error code 1 in /private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-2nqbhW/pygraphviz

пожалуйста, помогите, у меня установлен graphviz:

$ brew install graphviz
Updating Homebrew...
Warning: graphviz 2.40.1 is already installed and up-to-date
To reinstall 2.40.1, run `brew reinstall graphviz`

1 Ответ

0 голосов
/ 11 апреля 2019

Есть зависимости, которые вам нужно установить перед pygraphviz.Ну, на самом деле, согласно документации :

brew install graphviz
...