TrustTrees
TrustTrees copied to clipboard
ERROR: Failed building wheel for pygraphviz | × Running setup.py install for pygraphviz did not run successfully. | error: legacy-install-failure
Building wheel for pygraphviz (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [58 lines of output]
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-3.10/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2987:10: fatal error: graphviz/cgraph.h: No such file or directory
2987 | #include "graphviz/cgraph.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 Running setup.py clean for pygraphviz
Running setup.py install for pygraphviz ... error error: subprocess-exited-with-error
× Running setup.py install for pygraphviz did not run successfully. │ exit code: 1 ╰─> [63 lines of output]
How to resolve these issues? its saying the issue with the package not with pip. Help please.
I'm also getting the same error ...... someone pls reply
Installing this first did it for me:
apt-get install python3-dev graphviz libgraphviz-dev pkg-config -y
Had the same issue before running @dxa4481 suggested command. @dxa4481 MVP. Thanks !
python3-dev graphviz libgraphviz-dev pkg-config -y
Collecting graphviz
Downloading graphviz-0.20.1-py3-none-any.whl (47 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.0/47.0 kB 1.3 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement libgraphviz-dev (from versions: none)
ERROR: No matching distribution found for libgraphviz-dev
^ https://stackoverflow.com/questions/40266604/pip-install-pygraphviz-fails-failed-building-wheel-for-pygraphviz