Skip to content

🐛 Installation failure on macOS #115

@wjrforcyber

Description

@wjrforcyber

Hi!
I keep seeing this on
macOS 15.3.2
uv 0.6.14 (a4cec56dc 2025-04-09)
I search for a bit and it seems an old problem which has workaround but no fix, check the thread here.

uv sync                  
Resolved 126 packages in 5ms
  × Failed to build `pygraphviz==1.14`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      copying pygraphviz/scraper.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz
      copying pygraphviz/graphviz.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz
      copying pygraphviz/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz
      copying pygraphviz/agraph.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz
      copying pygraphviz/testing.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz
      copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_string.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_html.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_repr_mimebundle.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_close.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_clear.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_layout.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_graph.py -> build/lib.macosx-11.0-arm64-cpython-312/pygraphviz/tests
     ...
     ...
     ...
      pygraphviz/graphviz_wrap.c:9:9: warning: 'SWIG_PYTHON_STRICT_BYTE_CHAR' macro redefined [-Wmacro-redefined]
          9 | #define SWIG_PYTHON_STRICT_BYTE_CHAR
            |         ^
      <command line>:2:9: note: previous definition is here
          2 | #define SWIG_PYTHON_STRICT_BYTE_CHAR 1
            |         ^
      pygraphviz/graphviz_wrap.c:3023:10: fatal error: 'graphviz/cgraph.h' file not found
       3023 | #include "graphviz/cgraph.h"
            |          ^~~~~~~~~~~~~~~~~~~
      1 warning and 1 error generated.
      error: command '/usr/bin/cc' failed with exit code 1

      hint: This error likely indicates that you need to install a library that provides "graphviz/cgraph.h" for
      `pygraphviz@1.14`
  help: `pygraphviz` (v1.14) was included because `aigverse:dev` depends on `pygraphviz`

Probably need to give an instruction on this when install on Mac(I only see relevant issues on Mac so far)?
Since pip does allow virtual environments to access global package using --system-site-packages(although not recommended) but I'm not an expert in uv, so even if I would like to use the bypass method it's not quite easy, is there a simple way to separate graphviz out?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbuild_systemChanges affecting the build systemdocumentationImprovements or additions to documentationhelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions