Skip to content

Error when graphviz is not installed (macOS) #33

Open
@seewoo5

Description

@seewoo5

I got the following error because graphviz or pygraphviz was not installed previously. It would be great if it could be added as a requirement and installed automatically when pip install leanblueprint. I'm using M2 MacBook Air with Sonoma 14.5, and this answer helped me to install it.

Building wheels for collected packages: pygraphviz
  Building wheel for pygraphviz (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pygraphviz (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [63 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14-arm64-cpython-310
      creating build/lib.macosx-14-arm64-cpython-310/pygraphviz
      copying pygraphviz/scraper.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      copying pygraphviz/graphviz.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      copying pygraphviz/__init__.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      copying pygraphviz/agraph.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      copying pygraphviz/testing.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      creating build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_string.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/__init__.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_html.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_repr_mimebundle.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_close.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_clear.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_layout.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-14-arm64-cpython-310/pygraphviz/tests
      copying pygraphviz/tests/test_graph.py -> build/lib.macosx-14-arm64-cpython-310/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 '*.swg'
      warning: no files found matching '*.png' under directory 'doc'
      warning: no files found matching '*.html' 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'
      adding license file 'LICENSE'
      writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
      copying pygraphviz/graphviz.i -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-14-arm64-cpython-310/pygraphviz
      running build_ext
      building 'pygraphviz._graphviz' extension
      creating build/temp.macosx-14-arm64-cpython-310
      creating build/temp.macosx-14-arm64-cpython-310/pygraphviz
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/opt/homebrew/opt/llvm/include -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-14-arm64-cpython-310/pygraphviz/graphviz_wrap.o
      pygraphviz/graphviz_wrap.c:9:9: warning: 'SWIG_PYTHON_STRICT_BYTE_CHAR' macro redefined [-Wmacro-redefined]
      #define SWIG_PYTHON_STRICT_BYTE_CHAR
              ^
      <command line>:2:9: note: previous definition is here
      #define SWIG_PYTHON_STRICT_BYTE_CHAR 1
              ^
      pygraphviz/graphviz_wrap.c:3023:10: fatal error: 'graphviz/cgraph.h' file not found
      #include "graphviz/cgraph.h"
               ^~~~~~~~~~~~~~~~~~~
      1 warning and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pygraphviz
Failed to build pygraphviz
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pygraphviz)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions