TrustTrees icon indicating copy to clipboard operation
TrustTrees copied to clipboard

ERROR: Failed building wheel for pygraphviz | × Running setup.py install for pygraphviz did not run successfully. | error: legacy-install-failure

Open Cyphercoda opened this issue 3 years ago • 6 comments

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]

Cyphercoda avatar Sep 13 '22 05:09 Cyphercoda

How to resolve these issues? its saying the issue with the package not with pip. Help please.

Cyphercoda avatar Sep 13 '22 05:09 Cyphercoda

I'm also getting the same error ...... someone pls reply

ghost avatar Nov 16 '22 18:11 ghost

Installing this first did it for me:

apt-get install python3-dev graphviz libgraphviz-dev pkg-config -y

dxa4481 avatar Jan 21 '23 05:01 dxa4481

Had the same issue before running @dxa4481 suggested command. @dxa4481 MVP. Thanks !

matreurai avatar May 17 '23 21:05 matreurai

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

Drjacky avatar Dec 18 '23 17:12 Drjacky

^ https://stackoverflow.com/questions/40266604/pip-install-pygraphviz-fails-failed-building-wheel-for-pygraphviz

Anon-Exploiter avatar Apr 03 '24 03:04 Anon-Exploiter