LNN
LNN copied to clipboard
Couldn't git clone due to legacy-install-failure
Error looks like below:
clang: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument] pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found #include "graphviz/cgraph.h" ^~~~~~~~~~~~~~~~~~~ 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: legacy-install-failure
× Encountered error while trying to install package. ╰─> pygraphviz
I used brew to install the graphviz in requirements. It seems like the package is installed automatically somewhere else.
Whenever you see legacy-install-failure, always adding the following line in front of pip solves the problem:
env "CFLAGS=-I/opt/homebrew/include -L/opt/homebrew/lib" pip install git+https://github.com/IBM/LNN.git