mirror of
https://github.com/patrickchugh/terravision.git
synced 2026-05-09 08:25:25 +02:00
[GH-ISSUE #183] Install fails on Mac due to pygraphviz #111
Labels
No labels
bug
enhancement
enhancement
good first issue
good first issue
good first issue
pipeline
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/terravision#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @snemetz on GitHub (Apr 1, 2026).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/183
MacOS 26.2
Python 3.14.3
Tried pipx and install using requirement file. Both report same issue
While they both report the above, pipx log file also had this
@snemetz commented on GitHub (Apr 1, 2026):
Found this and it allowed me to get it installed
@patrickchugh commented on GitHub (Apr 3, 2026):
Thanks for reporting this @snemetz! This is a known issue on macOS where
pygraphviz(a transitive dependency viagraphviz2drawio) needs to compile a C extension but can't find the Graphviz headers.Your workaround with
CFLAGS/LDFLAGSis correct. We've now added an install script that automates this — it detects your Graphviz installation automatically whether you're using Homebrew, MacPorts, or a manual install:The script checks (in order):
pkg-config— works with any package managerbrew --prefix graphviz)/opt/local)/usr/local,/usr)On Linux this isn't needed since package managers install headers to standard paths. This only affects macOS where Graphviz headers end up in non-standard locations.
Let us know if this helps!
@patrickchugh commented on GitHub (Apr 3, 2026):
Thanks for reporting this @snemetz. This is a known issue with
pygraphvizon macOS — it needs Graphviz C headers at compile time, and on Apple Silicon Macs Homebrew installs to/opt/homebrew/which isn't in the default compiler search path.We've updated TerraVision so that
pygraphviz(needed only for draw.io export) is no longer a required dependency on macOS or Windows. A standard install now works cleanly on all platforms:If you need draw.io export, install the optional extra with the Graphviz header flags:
This will be included in the next release. Thanks for the workaround you posted — that's exactly the right fix for the underlying
pygraphvizbuild issue.